| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
$subcat.product_count no longer works | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
$subcat.product_count no longer works
Hi, I've recently had my site moved to a new server, and I've just noticed that my subcategory product boxes no longer display the number of items in them.
My site is at http://www.3drom.com/store/ and you can view an example at http://www.3drom.com/store/home.php?cat=3 The template is customer/main/category_box.tpl, and the relevant code is as follows: Code:
I've tried commenting out {if $subcat.product_count} and it then displays "0 product" It just no longer seems to find the variable { $subcat.product_count }. I've made sure that " Show quantity in stock: " is ticked in General Settings, Appearance.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#2
|
|||||||
|
|||||||
Re: $subcat.product_count no longer works
Sorry to bump this, but I wondered if anybody had any ideas.
If I put Code:
then it displays "1 product" (or however many products there are) but if I put Code:
it doesn't display anything! Surely if it displays a value for {$subcat.product_count} then {if $subcat.product_count} should work?
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: $subcat.product_count no longer works
{$subcat.product_count} {$lng.lbl_product}{if $subcat.product_count ne 1}s{/if}
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#4
|
|||||||
|
|||||||
Re: $subcat.product_count no longer works
Thanks for your help Steve - should it say "0 products" because I have set all product quantities to zero? I thought it would show "5 products" if there are five products in that subcategory, even though the quantity of each product is zero.
I currently have the following code: Code:
Code:
Nothing from {if $config.Appearance.count_products eq "Y"} onwards works, even though it's turned on in the Control Panel. And if I put Code:
it doesn't work. Why is that? Is it because $subcat.product_count has a value of zero? I thought it was counting the number of products, not product quantities.
__________________
X-Cart Gold Version 4.3.2 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: $subcat.product_count no longer works
Not sure what you are trying to do but if it doesn't work then you are not using it correctly. And yes I think the product count should count products not their quantities
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: $subcat.product_count no longer works
try
{if subcat.product_count gt 0} or {if subcat.product_count neq 0} You appear to be testing for the existence of the variable instead of that it is not 0. ---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|