Skip to main content

Need to show all Variant Images at once

More
13 years 11 months ago #69981 by heart0
I need to show my variant images like this:

www.ofcentral.com/NEW/apparel/vehicle/pr...when-your-cup-holder

I used Aceshop in that store. But Aceshop isn't working on this other site (I think it's a hosting issue) so I'm trying out Hikashop for the first time. But I need to be able to show my variants like the above example. Is that possible in hikashop as is? Or is there a plugin of some kind I can install?

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago - 13 years 11 months ago #70070 by Xavier
Hi,

You can edit the file "product / show_default" in HikaShop > Display > Views and try to add the following code:
Code:
<?php foreach($this->element->variants as $variant){ foreach($variant->characteristics as $k => $characteristic){ $char_id = $characteristic->variant_characteristic_id; $cat_id = $k; } foreach($variant->images as $image){ echo '<img onClick="document.getElementById(\'hikashop_product_characteristic_'.$cat_id.'\').value = '.$char_id.'; document.getElementById(\'hikashop_product_characteristic_'.$cat_id.'\').focus();" style="height:100px;" src="' . $this->image->uploadFolder_url . $image->file_path . '" alt="' . $image->file_name . '" />'; } } echo '<input type="hidden" onFocus="return hikashopUpdateVariant(this);" id="hikashop_product_characteristic_'.$cat_id.'" value="">'; ?>

It's an example, you can do it in another way.
Last edit: 13 years 11 months ago by Xavier.

Please Log in or Create an account to join the conversation.

Time to create page: 0.134 seconds
Powered by Kunena Forum