Good afternoon.
Excuse my English.
I have a client with a store with over 4000 products.
many products do no have image.
VM2 can be configured to not display the products that no have image?
Thanks
without hacking the core query you could do something like this in the product template
// Start the Output
foreach ($this->products as $product) {
if($product->virtuemart_media_id[0] > 0){
don't forget the closing curly brace
this will only prevent them displaying - will still appear (I assume) in search etc
Thank you very much ...
Sorry I'm not an expert.
Where exactly put this hack?
thanks again
Quote from: GJC Web Design on November 26, 2013, 22:41:33 PM
without hacking the core query you could do something like this in the product template
// Start the Output
foreach ($this->products as $product) {
if($product->virtuemart_media_id[0] > 0){
don't forget the closing curly brace
this will only prevent them displaying - will still appear (I assume) in search etc
make a template over ride
templates/your_template/html/com_virtuemart/category/default.php
default.php is copied from
components/com_virtuemart/views/category/tmpl/default.php
code
if($product->virtuemart_media_id[0] > 0){
goes straight after ~ line 213
// Start the Output
foreach ($this->products as $product) {
................ ............................
closing curly
}
goes immediately before ~ line 423
} // end of foreach ( $this->products as $product )
Quote from: charlycx on November 26, 2013, 22:03:00 PM
many products do no have image.
VM2 can be configured to not display the products that no have image?
You should use forum search for finding already posted solutions. For example using 1x1 transparent images (placeholders).