News:

Looking for documentation? Take a look on our wiki

Main Menu

Generic Child Variant Images

Started by skawars, July 13, 2018, 13:29:24 PM

Previous topic - Next topic

skawars

Hi All,

First of all the site is using:

Joomla! 3.8.7
VirtueMart 3.2.12
PHP 5.6

I've done a product import and I'm having some issues getting the child product image to display when using generic child variant. The example is here: http://31.24.106.193/~dyvels/index.php/bed-and-bath/bathroom-accessories/pouch-cube-iona-detail

The the parent product displays, and shows the 1 image attached to the parent.

The problem is when selecting a child product from the select box, say Pouch Cube Iona Litchi for example. The product information updates, but the image does not change. In the VM Admin area the child product has 2 images of its own, but the site is still showing the image for the parent product and not the child?

I've noticed if do a refresh on the page, it updates the image so do I need to manually trigger a page load whenever the select box is used?

Thanks


Jörgen

Is your template up to date? Talk with your template developer.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

skawars

Quote from: Jörgen on July 13, 2018, 13:48:53 PM
Is your template up to date? Talk with your template developer.
Jörgen @ Kreativ Fotografi

I am the template developer.

It's a template override of the product details template, but the default_images.php file hasn't been changed other than to add a css class work with the latest version of fancybox, and I was still having this issue before making any changes to this part of the template.

Is this normal functionality of virtuemart? It seems the product descriptions etc update without a page load, but the images do not?

Studio 42

The class selector certainly not select all the product render, si i think it's because this that your image is not updated.
You have perhaps to modify or add the class in your default.php file override i think by default, class is productdetails-view

GJC Web Design

the image if different does load for children, basically the selection causes an ajax call  (if ajax enabled) or a new call to the child which is a separate product with all its own elements

check at a code level what is being returned in the $this->product->images object -- is it the child image?
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

Jörgen

A sensible override of the template of 3.2.12 should work. Older templates miss the class studio42 is talking about. I gave had no issues with child products not changing images. There is a note
http://virtuemart.net/news?start=5
That tells the whole story, is this included in your template ?
If not, it might be the problem.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

skawars

Thanks for your responses everyone.

I first of all replaced some of the VM classes that surround the product as suggested, with no change.

I then noticed in the inspector window when I remove the template override there was a lot of extra JS at the bottom of the page, and after comparing the original default.php to my template override, I had removed the JS at the bottom to make the AJAX update work.

All working now!
Cheers