Jump to content
Sign in to follow this  
Jan Zonjee

[Contribution] Optimize Categories Box

Recommended Posts

Yes.

in admin panel products in category:

Software
 |___Action
 | |___Unreal Tournament
 |___Simulation
 | |___SWAT 3: Close Quarters Battle
 |___Strategy
 | |___Disciples: Sacred Lands
 | |___The Wheel Of Time
 |___Beloved
 |___Courage Under Fire
 |___Red Corner

I think you switched the original and the "optimize categories box" one. I don't know how the demo store is set up but I assume you moved those 3 products to Software and still got the New Products module shown. That is not the standard behaviour of osCommerce.

 

If there is a product in a category the product listing will be shown, not the subcategory images with the New products box.

Share this post


Link to post
Share on other sites

Unfortunately for my shop does not show the product listing, if in category ist products and subcategories.

As I showed this in screenshots.

I installed in my shop:

Optimize_tep_get_tax_ratev1.1_1

Optimize categories box v1.2

tep_get_category_tree optimization v2

tep_get_path_optimization_v1_0

Then remove:

tep_get_path_optimization_v1_0 (and restored function tep_get_path of Optimize categories box v1.2 contrib)

 

I'm removed cache, disabled cache and then nothing :(

Edited by hADeSik

Regards

hADeSik

Share this post


Link to post
Share on other sites

Hello.

 

Great contribution!! I installed it on my test RC2a store and queries went down from 212 to 87! Wow!!

 

But I'm having a little problem: when I turn the cache feature on in the admin, I get this error on the store:

 

Fatal error: Call to undefined function tep_cache_products_count() in C:\xampp\htdocs\My Webs\loja3.0\includes\classes\CountProductsStore.php on line 18

 

How can I fix it? Should I bother at all or just leave the cache off?

 

Thanks in advance for any help. :)


Patty

Share this post


Link to post
Share on other sites

Hi again Jan,

I have a problem in products_info.php

here:


<?php
//added for cross xsell
   if ((USE_CACHE == 'true') && empty($SID)) {

   echo tep_cache_also_purchased(3600);
   echo tep_cache_xsell_products(3600);
//  echo tep_cache_products_sets(3600);

   } else {

//  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
//  include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
//  include(DIR_WS_MODULES . FILENAME_PRODUCT_SETS);
//  include(DIR_WS_MODULES . 'product_sets.php');
 }

 

The problem is when caching xsell_products

 

In this case working:

echo tep_cache_also_purchased(3600);

// echo tep_cache_xsell_products(3600); //added for Xsell

// echo tep_cache_products_sets(3600);

 

I think the bad code is in catalog/includes/functions/cache.php

// Cache the also Xell module
 function tep_cache_xsell_products($auto_expire = false, $refresh = false) {
global $HTTP_GET_VARS, $language, $languages_id;

$cache_output = '';

if (isset($HTTP_GET_VARS['products_id']) && is_numeric($HTTP_GET_VARS['products_id'])) {
  if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) {
	ob_start();
	include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
	$cache_output = ob_get_contents();
	ob_end_clean();
	write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $HTTP_GET_VARS['products_id']);
  }
}

return $cache_output;
 }

It should be modified??

 

In other hand, you said with hide products sppc to use also_purchased_products_hide_products.php

what it should done??

a. modify the define in filenames.php to also_purchased_products_hide_products.php, or

b. modify the archive also_purchased_products.php

Edited by bhbilbao

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×