Show Posts


Messages - smallfish

Pages: 1 2 [3] 4 5 ... 9
31
Support / Re: Big data caused memory exhausted
« on: January 03, 2017, 10:17:52 AM »
If you are going to re-design or restructure the cache handling method, please also restructure the home page loading and category/product loading page. Because the loading speed is very slow (take around 20-30 seconds:this is under no traffic environment. if the website is published, it will take a longer time to load the page) for opening the page if the product table is big.

32
Support / Re: Big data caused memory exhausted
« on: January 03, 2017, 02:19:51 AM »
The largest files in in /cache/category/ is 13KB
/cache/extension/ is 15KB
/cache/html_cache/ is 15KB
/cache/resource/ is 12KB
/cache/setting/ is 32KB

Here is the script for generate 380K records (need to run 10 times, because the script will timeout after 3xxxx records in my server)
You can try to generate the dummy records in your testing server
=============================================
<?php
header("Content-Type: text/html; charset=utf-8");

// Database .............
//ini_set('max_execution_time', '3600');
$server = 'localhost:3306';
$database = 'yourdatabasename'; //change this
$datauser = 'databaseusername'; //change this
$password = 'password';         //change this
$connection = mysql_connect($server,$datauser,$password);

if (!$connection) {
die('Could not connect to MySQL database, the server return the error: '.mysql_error());
}

$db = @mysql_select_db($database);
@mysql_query("SET CHARACTER SET UTF8");

if (!mysql_query("SET NAMES 'utf8'", $connection))
return false;



for ($i=1; $i<=50000; $i++) {   //need to advance the $i value to new value for each running of this script , i.e for the 2nd time running this script, $i=50001; $i<=100000; I need to run 10times of this script because the script will timeout after generate 3xxxx records00
   $d = date("Y-m-d");
   $t = date("Y-m-d H:i:s");
   $end_date = date("Y-m-d", mktime(0, 0, 0, date("m"),   date("d"),   date("Y")+20));
   $itemcode = "Item " . substr('0000000000' . $i, -8);
   $athumb =  "catalog/demo/htc_touch_hd_1.jpg";
   $brand = 15;
   $price = 100;
   $points = 100;
   $cost = 60;
   $weight = 1;
   $weburl = "location A";
   $topcat = 43;
   $maincat = 48;

   mysql_query("INSERT INTO abc_products (location, model, quantity, stock_status_id, manufacturer_id, shipping, price, weight, weight_class_id, status, date_available, date_added, date_modified, cost) VALUES ('$weburl', '$itemcode', '100', '3', '$brand', '1', '$price', '$weight', '1', '1', '$d', '$t', '$t', '$cost') ");
   $product_id = mysql_insert_id();
   $goods_id = $product_id;
   $company =0;
   mysql_query("INSERT INTO abc_products_to_categories (product_id, category_id) VALUES ('$goods_id', '$maincat') ");
   mysql_query("INSERT INTO abc_products_to_categories (product_id, category_id) VALUES ('$goods_id', '$topcat') ");
   mysql_query("INSERT INTO abc_products_to_stores (product_id, store_id) VALUES ('$product_id', '$company') ");

   $title = "Title " . $itemcode;
   $alldesc1 = "商品說明 " . $itemcode;  //Chinese name
   $alldesc2 = "Product Description " . $itemcode;  //English name
   $picpath2 = "18/79/1.jpg";

   mysql_query("INSERT INTO abc_resource_library (type_id, date_added, date_modified) VALUES ('1', '$t', '$t')");
   $resource_id = mysql_insert_id();
   mysql_query("INSERT INTO abc_resource_map (resource_id, object_name, object_id, sort_order, date_added, date_modified) VALUE ('$resource_id', 'products', '$product_id', '2', '$t', '$t') ");

   mysql_query("INSERT INTO abc_resource_descriptions (resource_id, language_id, name, title, description, resource_path, resource_code, date_added, date_modified) VALUES ('$resource_id', '1', '$alldesc1', '$title', '', '$picpath2', '', '$t', '$t')");
   mysql_query("INSERT INTO abc_resource_descriptions (resource_id, language_id, name, title, description, resource_path, resource_code, date_added, date_modified) VALUES ('$resource_id', '2', '$alldesc2', '$title', '', '$picpath2', '', '$t', '$t')");

   $keyword = "Keyword-" . substr('0000000000' . $i, -8);
   $key1 = "product_id=$product_id";
   $keyw1 = $keyword . "-en";
   $keyw2 = $keyword . "-hk";

   mysql_query("INSERT INTO abc_url_aliases  (language_id, query, keyword) VALUES ('1', '$key1', '$keyw1') ");
   mysql_query("INSERT INTO abc_url_aliases  (language_id, query, keyword) VALUES ('2', '$key1', '$keyw2') ");


   mysql_query("INSERT INTO abc_product_descriptions (product_id, language_id, name, meta_keywords, meta_description, description) VALUES ('$product_id', '1', '$title', '$title', '$title', '$alldesc1')" );
   mysql_query("INSERT INTO abc_product_descriptions (product_id, language_id, name, meta_keywords, meta_description, description) VALUES ('$product_id', '2', '$title', '$title', '$title', '$alldesc2')" );


   $mprice = 99;
   $vprice = 98;
   $vvprice = 97;
   mysql_query("INSERT INTO abc_product_discounts (product_id, customer_group_id, quantity, price) VALUES ('$product_id', '8', '1', '$mprice') ");  //reg. member price;
   mysql_query("INSERT INTO abc_product_discounts (product_id, customer_group_id, quantity, price) VALUES ('$product_id', '9', '1', '$vprice') ");  //vip. member price;
   mysql_query("INSERT INTO abc_product_discounts (product_id, customer_group_id, quantity, price) VALUES ('$product_id', '10', '1', '$vvprice') ");  //wholesale. member price;



   mysql_query("INSERT INTO abc_product_options (product_id, status, element_type, required) VALUES ('$product_id', '1', 'S', '1') ");
   $product_option_id = mysql_insert_id();   

   $oname = "color";
   mysql_query("INSERT INTO abc_product_option_descriptions (product_option_id, language_id, product_id, name) VALUES ('$product_option_id', '1', '$product_id', '$oname')");
   mysql_query("INSERT INTO abc_product_option_descriptions (product_option_id, language_id, product_id, name) VALUES ('$product_option_id', '2', '$product_id', '$oname')");

   $optprice =0;
   $weight = 0;

   for ($h = 1; $h <= 10; $h++) {

          mysql_query("INSERT INTO abc_product_option_values (product_option_id, product_id, quantity, subtract, price, prefix, weight, weight_type, attribute_value_id, sort_order)
   VALUES ('$product_option_id', '$product_id', '50', '0', '$optprice', '$', '$weight', 'kg', '0', '0')");
          $product_option_value_id =  mysql_insert_id();       
          $color = 50;
          $optprice = 0;

      $optvalue = "Color " . $h;
      mysql_query("INSERT INTO abc_product_option_value_descriptions (product_option_value_id, language_id, product_id, name, grouped_attribute_names) VALUES ('$product_option_value_id', '1', '$product_id', '$optvalue', '')" );
      mysql_query("INSERT INTO abc_product_option_value_descriptions (product_option_value_id, language_id, product_id, name, grouped_attribute_names) VALUES ('$product_option_value_id', '2', '$product_id', '$optvalue', '')" );   

      
   }

}


echo "end of program...";
die();

?>


33
Support / Re: Big data caused memory exhausted
« on: December 30, 2016, 02:37:24 AM »
Let's try to pinpoint the problem. Can you try file based cache or memcache with SEO on?

File based cache also has this problem. Problem is still caused by serialize(). Abantecart needs to read the big data (here should be the table abc_url_aliases) a few times. (limit the max. no. of records each time). If not, Serialize() can't handle it.

34
Support / Re: Big data caused memory exhausted
« on: December 29, 2016, 10:19:55 AM »
abantecart v.1.2.9, enabled SEO in backend, enabled xCache, inserted 380 thousands of dummy products, then tried to open the front store but failed. The above error occurred.
If disable SEO in backend, there is no problem.

35
Support / Big data caused memory exhausted
« on: December 29, 2016, 12:32:47 AM »
2016-12-29 5:11:55 - error:  AbanteCart core v.1.2.9 Allowed memory size of 536870912 bytes exhausted (tried to allocate 15757865 bytes) in <b>core/lib/cache.php</b> on line <b>221</b>
I have increased the memory_limit to 512MB or 1024MB but still can't solve it. I have 380 thousands of products (testing data) in the database.
This line
      if (!is_null($data) && $this->enabled && $this->cache_driver && $this->cache_driver->isSupported()){
         $data = serialize($data);
get problem. If I disable the ( Use SEO URL's ) or disable (Cache) in backend setting, this error will not occur.
I have enabled the XCache to speed up the loading of the product listing pages since I have 380 thousands of products in the database.
Please try to fix this problem and improve the code.
Thank you!

36
General Support / sorting order problem (Date New -> Old)
« on: December 28, 2016, 11:07:09 PM »
When I click the earlier product and sort by Date New -> Old. After return to the product listing screen, the clicked product will go to the 1st position. Also the same case for sorting Old -> New (But need to refresh screen).
http://demo.abantecart.com/shoes&sort=date_modified-DESC&limit=20 (try to click the 2nd, 3rd, 4th product and return back to the product listing screen).
Please fix it.
Thank you!

37
Support / Re: How to enable xcache in abantecart?
« on: December 28, 2016, 10:55:20 PM »
Should I also put this line in the file?
define('CACHE_SECRET', 'your_secret_key');

tried to open file of xcache driver public_html/core/cache/xcache.php and reading comment at the top:
Code: [Select]
/**
 * XCache driver
 *
 * NOTE: to use this driver put lines belong into your system/config.php

define('CACHE_DRIVER', 'xcache');
define('CACHE_SECRET', 'your_secret_key');

Did you tried to do this?

38
Support / How to enable xcache in abantecart?
« on: December 23, 2016, 04:29:06 AM »
I have modify the /system/config.php
define('CACHE_DRIVER', 'file'); to define('CACHE_DRIVER', 'xcache');
But it seems not working...
Xcache is already enable in php.

After I tried to clear the cache in backend admin, the HTTP ERROR 500 was occurred.
The frontstore had no error, but didn't see any effect on frontend.

How can I setup xcache in abantecart and make it working!?


39
Support / Re: edit product price in order edit
« on: September 25, 2015, 06:38:58 PM »
Hi Lee
It doesn't help. I want to add the discount to the order directly. (edit it in the backend (order edit)).
Thank you!

40
Support / Re: edit product price in order edit
« on: September 25, 2015, 12:12:38 PM »
But it doesn't affect the total amount. Abantecart will update the total amount when the product quantity change. So that when the unit price is modified, then call the same function as the quantity change.
Anyway, I only find the "coupon" in the "add new amount in total calculation". How can I add "discount" or other type of total when select the type from the pull down?

41
Support / edit product price in order edit
« on: September 23, 2015, 01:19:57 PM »
How can I enable the unit price edit inside order edit in backend?

42
Support / Re: can't add product to shopping cart in chrome
« on: September 03, 2015, 11:37:26 AM »
But it should be applied to all the related address inputs and outputs.

You should better modify the template to show the short description. Most of the abantecart users don't want to do it themselves.

For the address format, I have already entered the format in the backend as the following :
Example:
{firstname} {lastname}
{address_1}
{address_2}
{zone}
{country}

But it doesn't work with the storefront's registration screen and edit address screen.
I just want to ignore the postal code field in the registration screen and edit address screen.
Although I can modify the script to disable the verification of postal code field. But it is hard code for one country only. However, some other countries still need the postal code.

Please create separate topic for address format discussion.
Anyway address format used in new order for Order Invoice only

43
Support / Re: can't add product to shopping cart in chrome
« on: September 01, 2015, 01:53:49 PM »
You should better modify the template to show the short description. Most of the abantecart users don't want to do it themselves.

For the address format, I have already entered the format in the backend as the following :
Example:
{firstname} {lastname}
{address_1}
{address_2}
{zone}
{country}

But it doesn't work with the storefront's registration screen and edit address screen.
I just want to ignore the postal code field in the registration screen and edit address screen.
Although I can modify the script to disable the verification of postal code field. But it is hard code for one country only. However, some other countries still need the postal code.


For the shopping cart problem, I have created two store and using 2 domains. You may try to create multi-stores to test it.

The first and 2nd times, I have tried to clear the browsing data in the past day (chrome). I still can't add the products to the shopping cart.
Today, I have cleared the browsing data from the beginning (All previous data), then I can add the products to the shopping cart (chrome) again.
However, when I closed chrome and re-opened it and I couldn't add the product to shopping cart again and I found that there was 1 product in the shopping cart which was added from previous testing.
After that I have removed the product from the shopping cart and tried to add a new product to shopping cart and it was successfully.
Here after, I wanted to re-produce the bug again but it was failed. There is no problem right now.

In conclusion, abantecart should pay more attention on the storefront basic functions and features and make abantecart more reliable.
Thank You, smallfish and everyone for your time.
We really want to catch and fix this issue but we can not replicate it on our side (checked on several PCs, Mac and different browsers).
What we found is issue related to several AbanteCart installations on one domain like domain.com/store1 domain.com/store2 So we already looking for a solution https://github.com/abantecart/abantecart-src/issues/120

The main problem is that we dont know a pieces of this quiz:
  • AbanteCart version
  • server session related settings
  • server cdn or cache plugins - for example very popular cloudflare CDN in high security mode hard-cache important scripts and broke them  :-X
  • browser version
  • browser addons (various addons block/filter coockies) - Adblock, Ghostery, WebMoney Advisor, various Security addons.......
  • OS
  • antivirus/firewall in your OS - In my practice incorrectly configured firewalls filter all browser traffic and block new eCommerce sites with zero rating for example see this post (popular antivirus block ecommerce site)
  • ....etc
  • ....etc



Besides, I also want abantecart to fix the long product description  (description more than 1 screen page with html content) in the default template (can't display product listing properly with long product description, I have suggested to add a short text description in the past).
In AbanteCart 1.2.3 we add blurb field so modify your template code a bit to show only short description (blurb) or limit full description characters to display in listing.


Moreover, I also want abantecart to implement the address format for different countries in the backend admin and storefront, so that admin user can set the address format which can include or exclude the zip code/postal code, states, etc for the specified country (implement it at registration, edit address, etc.).

Hope to see abantecart become more reliable, efficient, popular and completed shopping cart system.


Regarding to Address Format - is this work for you http://docs.abantecart.com/pages/localization/country_and_zone/edit_country.html ?
Please note we can not change core address code because this will touch tons of changes in other places. For example several shipping will not work with not standard address also some payment like PayPal may block transaction if address is not in their standards.....etc



Anyway create separate topic regarding changes required and attach Poll. If this changes needed for many users we will add them in the future.

Thank You.

44
Support / Re: can't add product to shopping cart in chrome
« on: August 29, 2015, 11:06:26 PM »
The first and 2nd times, I have tried to clear the browsing data in the past day (chrome). I still can't add the products to the shopping cart.
Today, I have cleared the browsing data from the beginning (All previous data), then I can add the products to the shopping cart (chrome) again.
However, when I closed chrome and re-opened it and I couldn't add the product to shopping cart again and I found that there was 1 product in the shopping cart which was added from previous testing.
After that I have removed the product from the shopping cart and tried to add a new product to shopping cart and it was successfully.
Here after, I wanted to re-produce the bug again but it was failed. There is no problem right now.

In conclusion, abantecart should pay more attention on the storefront basic functions and features and make abantecart more reliable. Besides, I also want abantecart to fix the long product description  (description more than 1 screen page with html content) in the default template (can't display product listing properly with long product description, I have suggested to add a short text description in the past). Moreover, I also want abantecart to implement the address format for different countries in the backend admin and storefront, so that admin user can set the address format which can include or exclude the zip code/postal code, states, etc for the specified country (implement it at registration, edit address, etc.).

Hope to see abantecart become more reliable, efficient, popular and completed shopping cart system.

45
New Features Discussion / shopping cart price rules
« on: August 24, 2015, 01:37:14 PM »
shopping cart price rules
For example :
Here are a few of the discount type promotions you can offer:

Buy 1st 10% discount off, 2nd item 15% off, 3rd item 20% off, etc.
Buy 2 pants and receive 20% off belts
Buy 1 shirt and get the 2nd 50% off
New customers receive 10% off
Customers who have purchased more than $500.00 in the last 6 months get 15% off
Buy 3 dress shirts and receive any tie for $10.00
Buy any 3 products from the "shoes" category and receive 20% off the cheapest / most expensive
Buy any 2 shirts and receive 10% off the cheapest / most expensive
Buy a book and receive the 2nd book free (or 30% off, 75% off, etc)
Save $5.00 for every $100.00 spent
Get 10% each 3rd (or 2nd, 4th, etc) product purchased
Get any shirt and tie for $50.00 (in total)
Get 15% off all products in the cart after the 3rd product
Buy 2 shirts for normal price and each shirt thereafter for $30.00
All books for $4.99

Pages: 1 2 [3] 4 5 ... 9

Powered by SMFPacks Social Login Mod