Hello, i am wondering how to add css class to all products images that are sold out on product listing pages?
I want to make black/white all pictures of sold out products till they are again in stock.
Best regards and many thanks in advance.
Hello, i am wondering how to add css class to all products images that are sold out on product listing pages?
I want to make black/white all pictures of sold out products till they are again in stock.
Best regards and many thanks in advance.
My most recent work: magprom.net
Seems that basically will want to target the file: includes/modules/YOUR_TEMPLATE/product_listing.php
There is a while loop within that file and the variable $listing->fields['products_quantity'] represents the quantity of the product in question. From that point, would want to "properly" assign the start and end of your new class based on your setup and desired operation. As to having that apply only to the product listing and not say featured listing, or specials listing, then as part of the check would need to identify if the $page_name or other factors are set as desired... Even testing perhaps if $tpl_page_body == 'tpl_index_product_list.php' might be possible (value is assigned back in the main_template_vars.php file for includes/modules/pages/index when the page is presenting categories.) There are other ways to test/identify the current page and it all depends on how you want things to work. :)
By-the-way YOUR_TEMPLATE would be the template override folder that is named the same as where your template is installed in the path includes/templates/YOUR_TEMPLATE. If the file does not exist in that directory then copy the file of the same name from includes/modules to the template override (creating the directory if necessary) and then make the edits desired...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...