- Posts: 7
- Thank you received: 0
How to add a picture in costume fields
14 years 6 months ago #43305
by aa211
How to add a picture in costume fields was created by aa211
Hi,
I have a store that sells various materials, they have height, width and texture.
I did variations of height and width but 160 came on the product, according to this price is determined.
Now I need to add texture that does not cost anything but a picture need to appear when you select a texture.
Any ideas how to do?
Many thank's.
I have a store that sells various materials, they have height, width and texture.
I did variations of height and width but 160 came on the product, according to this price is determined.
Now I need to add texture that does not cost anything but a picture need to appear when you select a texture.
Any ideas how to do?
Many thank's.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43309
by aa211
Replied by aa211 on topic Re: How to add a picture in costume fields
To be more explicit it is the link:
www.sunshadow.eu/produse/basic-shop/prod...ine-retractabile-sun
And I create custom field "tesatura" had to allocate according to the vaule the picture
www.sunshadow.eu/produse/basic-shop/prod...ine-retractabile-sun
And I create custom field "tesatura" had to allocate according to the vaule the picture
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43481
by nicolas
Replied by nicolas on topic Re: How to add a picture in costume fields
You will have to edit the file show_block_custom_item via the menu Display->Views and add some javascript code in the "onchange" attribute of the custom field in order to display the image you want when the selection changes.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43522
by aa211
Replied by aa211 on topic Re: How to add a picture in costume fields
Ty,
But i'm not very good at js u can give me 1 example ?
But i'm not very good at js u can give me 1 example ?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #43698
by nicolas
Replied by nicolas on topic Re: How to add a picture in costume fields
Basically, you need to display the div where you have the image for the current selection and hide the others.
to display the div of the current selection, you can do like that:
onchange="document.getElementById('div_'+this.value).display='block';"
So if the image is in a HTML div with the id div_myimage and the value of the selection should be myimage with that example. You will also need additional code to hide the other div like that:
document.getElementById(other_div_id).display='none';
to display the div of the current selection, you can do like that:
onchange="document.getElementById('div_'+this.value).display='block';"
So if the image is in a HTML div with the id div_myimage and the value of the selection should be myimage with that example. You will also need additional code to hide the other div like that:
document.getElementById(other_div_id).display='none';
The following user(s) said Thank You: aa211
Please Log in or Create an account to join the conversation.
14 years 6 months ago - 14 years 6 months ago #43814
by aa211
Replied by aa211 on topic Re: How to add a picture in costume fields
Hi Nicolas,
Thank you for prompt support, I managed to solve the problem with your support
hika shop is actually really good and with some adaptations for our specific I think we will do a really good work...
We haven't finished yet if we have more problems we will bother you with some questions that we will have
All the best.
Thank you for prompt support, I managed to solve the problem with your support
hika shop is actually really good and with some adaptations for our specific I think we will do a really good work...
We haven't finished yet if we have more problems we will bother you with some questions that we will have
All the best.
Last edit: 14 years 6 months ago by aa211.
Please Log in or Create an account to join the conversation.
Time to create page: 0.171 seconds