News:

Support the VirtueMart project and become a member

Main Menu

No image at virtuemart cart module

Started by pm4698, October 05, 2016, 23:42:32 PM

Previous topic - Next topic

pm4698

Joomla 3.6.2
Virtuemart 3.0.18

When i add products to cart, when i go to see the products in the cart from the virtuemart module cart, i see all data normally except from image. At image i see for all products this path:
http://www.mywebsite.com/ and no image at all.

I saw that inside module the image is called like this:
<?php echo $product["image"]; ?>

From other elements (like category view or productdetails view) i saw that the image is called like this:
<?php echo $product->images[0]->displayMediaThumb('class="browseProductImage"'false); ?>

I tried this but i got a blank template after this.

Any ideas?

Thank you in advance

Ghost

Default VM cart module does not show images. You must be using a 3rd party module or template with VM overrides.

pm4698

Yes, maybe, but what is the code to show the thumb of a product?

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

pm4698

I don't think that this should bother so much! Assume a web address. The problem is that i have posted the code used and the code i use and still i have a result like this. If you could figure out the issue by visiting website check here:

https://goo.gl/VNfcVw

GJC Web Design

that is the code to show when your in the browse view

the module doesn't have an image so u must be using a 3rd party one

in my cart mod I use

foreach ($cart->products as $cartproduct) {
                      if ($product['product_sku'] == $cartproduct->product_sku ) {
                  $image = $cartproduct->images[0]->displayMediaThumb ('', FALSE);
                      }
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation