.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks dr Byte
How do I get your code to display no price rather than £0.00
$product_check = $db->Execute("select master_categories_id, products_tax_class_id, products_price, products_priced_by_attribute, product_is_free, product_is_call, products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'" . " limit 1");
if ($product_check->fields['master_categories_id'] == 10) { // change '10' here to the category number
return '';
}
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks for comming back. GBP is the only currency in my admin, and surely currency only changes the symbel and exchange rate can you look at artofrecycling.co.uk/shop and then the sold category. Could really do with hiding the £0.00
Could you advise a code, maybe css to display no price field if that category?
thanks for the help so far Dr Byte
I think really the issue is can your code be modified to adapt to the data provided by DrByte's suggested modification? Okay, not so much can it be modified, but what is different that is causing this issue? Ie. How is the code on your site different than a vanilla install of ZC? (file/folder comparison software is available either as a free or commercial product.) Already the template code is different as described by the use of short codes, there is likely something else that is different causing the observed issue.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I find it great that I am getting all the insights about template coding, and I am appreciative. I am not a coder. I am using the BANA template. I would love for someone who knows that template to be able to assist in hiding the price field in category 3 listing page.
As a fix all I will have to use css to not display prices on all category listings pages, but my client would prefer not to go down that route.
Thanks to all so far for your imput in trying to resolve this for me
If they are OK with just the applicable category not showing prices (provided product is not a new, special or featured product) then you could create a css file just for that category. See the readme/info file in includes/templates/template_default/css
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
in all the years I have been using zen cart I have never noticed that file
So c_??_??.css would apply changes only to one category? Is the first ?? the category number and the second ?? the product number within that category?
would I just create a css file called c_03.css and then just display none the price field and it will only affect category 3?
A fantastic find if it is that simple
I would have to set no products to be marked as new as well I guess
Well, there is one thing though, the price won't be seen by the vast majority of customers, but the price data will still be present (view source will still show whatever price and search engines basically ignore css).
Otherwise, regarding the category css files, they are perhaps/possibly the most finicky because a category can be shown as the base/master category, but it can be a sub-sub-etc category and therefore the cPath could include just the finally category or sub-categories before it. But yes, effectively a single file could be used to visually hide something related to a particular category.
Solutions such as these tend to get offered when the goal is clearly identified and understood. Again to clearly state, using css to visually hide the price will still cause the product's price to be found in an Internet search only for a customer to arrive at a page indicating that the product was sold. It is not much of a plus to the customer's shopping experience... but then again, the store is being operated to keep the product listed, but under a sold category...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Bookmarks