After a year of trouble a simple tweek fixed my site

I moved back to CS-Cart from Shopify a year ago. Ever since then I had been unable to use my cart without it ‘hanging’ whenever I did stuff like ‘deleting’ or ‘editing’ product files. The shopfront was also very slow. CS-Cart support and Fastcomet both did their best to fix things but I remained stuck with a shop that I wasn’t performing well enough so I didn’t feel right inviting customers.
Fastcomet had an article in a recent newsletter.
How to Optimize Your CS-Cart e-Commerce Website.
One aspect was to do with Cache.
If you have access to the store’s root directory, you should also check if the local_conf.php file has the following line:
$config[‘tweaks’][‘disable_block_cache’] = true;
CS-Cart caches blocks to reduce page loading time. Because of this, we suggest you leave it as it is above. If it is set to false, simply change it back to true.
Mine was set to False so I changed it to True.
BINGO!!
My store admin and front end are now running like a dream.
Not sure why Fastcomet and CS-Cart support didn’t suggest this in the past.

Glad you figured it out but do you mean config.local.php? local_conf.php is not part of the default install and is added for development/debugging purposes.

Also, the default setting in config.local.php is:
'disable_block_cache' => false, // used to disable block cache

I copied and pasted so I guess it was a fastcomet typo and my eyes settled on the closest file by name :slight_smile:
I am thinking now…
Was this a totally bizarre coincidence or did the edit ( changing ‘false’ to ‘true’ ) in the config.local.php actually help me ?

Mine

// Tweaks
$config[‘tweaks’] = array (
// Whether to remove any javascript code from description and name of product, category, etc.
// Auto - false for ULT, true for MVE.
‘sanitize_user_html’ => ‘auto’,
‘anti_csrf’ => true, // protect forms from CSRF attacks
‘disable_block_cache’ => false, // used to disable block cache
‘disable_localizations’ => true, // Disable Localizations functionality
‘disable_dhtml’ => false, // Disable Ajax-based pagination and Ajax-based “Add to cart” button
‘dev_js’ => false, // set to true to disable js files compilation
‘redirect_to_cart’ => false, // Redirect customer to the cart contents page. Used with the “disable_dhtml” setting.
‘api_https_only’ => false, // Allows the use the API functionality only by the HTTPS protocol
‘api_allow_customer’ => false, // Allow open API for unauthorized customers
‘lazy_thumbnails’ => false, // generate image thumbnails on the fly
‘backup_db_mysqldump’ => true,
‘image_resize_lib’ => ‘auto’, // library to resize images - “auto”, “gd” or “imagick”
‘products_found_rows_no_cache_limit’ => 100, // Max count of SQL found rows without saving to cache
‘allow_global_individual_settings’ => true, // Allow global individual settings (Track inventory, Options type, Zero price action etc.)
);

This is mine now. Not sure why my list is longer than yours.
// Tweaks
$config[‘tweaks’] = array (
// Whether to remove any javascript code from description and name of product, category, etc.
// Auto - false for ULT, true for MVE.
‘sanitize_user_html’ => ‘auto’,
‘anti_csrf’ => true, // protect forms from CSRF attacks
‘disable_block_cache’ => false, // used to disable block cache
‘disable_localizations’ => true, // Disable Localizations functionality
‘disable_dhtml’ => false, // Disable Ajax-based pagination and Ajax-based “Add to cart” button
‘do_not_apply_promotions_on_order_update’ => true, // If true, the promotions that applied to the order won’t be changed when editing the order. New promotions won’t be applied to the order.
‘dev_js’ => false, // set to true to disable js files compilation
‘redirect_to_cart’ => false, // Redirect customer to the cart contents page. Used with the “disable_dhtml” setting.
‘api_https_only’ => false, // Allows the use the API functionality only by the HTTPS protocol
‘api_allow_customer’ => false, // Allow open API for unauthorized customers
‘lazy_thumbnails’ => false, // generate image thumbnails on the fly
‘image_resize_lib’ => ‘imagick’, // library to resize images - “auto”, “gd” or “imagick”
‘products_found_rows_no_cache_limit’ => 100, // Max count of SQL found rows without saving to cache
‘show_database_changes’ => false, // Show database changes in View changes tool
‘backup_db_mysqldump’ => false, // Backup database using mysqldump when available
‘allow_product_filters_to_create_temporary_table’ => true, // Allows product filters to create temporary table for products query
‘request_errors_threshold’ => 30, // Threshold for the number of errors when an email realtime delivery error notification is triggered
‘profile_field_max_upload_filesize’ => ‘10M’, //Limit max upload file size for profile fields
‘validate_menu’ => true, // Disable option to add any new element to top and central admin panel menu and to Add-ons top menu element.
‘secure_cookies’ => true, // Allow to set “Secure” flag to cookies, if your store works with HTTPS. P.S. All users will be log out, also, all abandoned carts will lost.
‘cors_allowlist’ => , // CORS enabled domains, e.g. [‘domain1.com’, ‘domain2.com’]
‘csp_frame_ancestors’ => , // The HTTP Content-Security-Policy (CSP) frame-ancestors directive specifies valid parents that may embed a page using ,

1 Like