Product not shown in main category

wxa

No avatar

2008-10-11 14:31

Hi there,

How can i prevent products in a subcategory to be also shown in main category ?

example:

-- Main category
---- Sub category

if i click on main category i also see products from the subcategory.
I dont want that. i need them only to be shown when i click on sub category.

Thanx in advance.

» Quick.Cart v3.x

beholder

Avatar: beholder

2008-10-11 15:39

Just a comment: I imagine there should be an option for this:
"Display products of the specific page only"

This shouldn't be too difficult to implement, since the script probably doesn't need to change too much.

beholder

Avatar: beholder

2008-10-11 16:13

HEY!!! I've done it !!
Just two small surgical operations need to be done for this and it took me 10 min to come up with this, so I offer this FOR FREE. This instruction is valid for QC 3.2rc, it is not too different for 3.1 and 3.0.

Edit the core/pages.php and add this function:


  
function throwOnlyOnePage$iPage ){
    
$bFirst = !isset( $this->mData ) ? true null;
    return isset( 
$bFirst ) ? $this->mData null;
  } 
// end function throwOnlyOnePage



Next edit the core/products.php and in the function listProducts change this line:
$aData = $oPage->throwAllChildrens( $iContent );

to this:
$aData = $oPage->throwOnlyOnePage( $iContent );

By the way, QC 3.0 has this line as:
$aData = $GLOBALS['oPage']->throwAllChildrens( $iContent );

wxa

No avatar

2008-10-12 13:11

I tried it and it works perfect !

Thanx so much for this answer beholder.
I also think that this should be a regular option, but as for now im glad you found the solution.

Thanx again.

beholder

Avatar: beholder

2008-10-12 15:34

You're welcome, wxa. If you really want to thank me though, go get my Easy Plugins 3 pluginpack.
Just right now I am adding another awesome plugin, I finished it yesterday, it displays subcategories in the content area. Just a small demo:
http://www.nlp.sk/qc/?asus,107&sGoto=ag

This was incredibly difficult to make, I had to hack into displaying of menu and it took me 2 previously failed tries (several hours wasted) plus 5 more hours of work to finish.

This way the customer doesn't have to scroll down after every click on a category if you have too many categories in the left menu. It also creates this very easily navigation-able block in the beginning of every page, just see the example how easy it is to understand where you are and where you can go from there..

wxa

No avatar

2008-10-26 15:33

Hello beholder,

could you please post the link to your easy plug-in pack ? Id like to check out the plugins and functionality.

Thank you.

beholder

Avatar: beholder

2008-10-26 15:41

sure, please follow here:
http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5238

QC 3.x

Back to top
about us | contact