Home
Forum
Extensions
Developer Portal
VirtueMart Forum
VirtueMart & Joomla! - The Future of eCommerce
Home
Help
Search
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Support the VirtueMart project and become a
member
VirtueMart Forum
»
VirtueMart 1.1.x [ Old version - no longer supported ]
»
Themes & Layout Problems and Customization VM 1.1
»
Custom code in product view
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Custom code in product view (Read 8087 times)
majolisa
Beginner
Posts: 4
Custom code in product view
«
on:
February 27, 2011, 13:23:53 PM »
Hi,
Is there a way I could add custom code in product view?? I want to add "see chart" link, so customers could see size chart for selected product...
Logged
PRO
Global Moderator
Super Hero
Posts: 10443
VirtueMart Version: 3+
Re: Custom code in product view
«
Reply #1 on:
February 27, 2011, 14:56:07 PM »
you could do this
This code goes in your flypage where you want the link
<?php if ($product_unit != 'piece') { ?>
<a title="Chart" href="images/stories/charts/<?php echo $product_unit ?>"">Size Chart</a><?php } if ($product_unit == 'piece') { ?>THE OTHER OPTION FOR NOTHING<?php } ?>
And how it works
You cannot use the "product unit" for any other purpose
Create a folder here images/stories/charts/
Move the size charts into the folder above
Then say you have a product that gets a certain size chart, you put that name in the product_unit field. Like Chart1.pdf
If you do not have a chart for a product leave the product_unit field set to "piece"
Logged
rdharma
Beginner
Posts: 22
Re: Custom code in product view
«
Reply #2 on:
May 07, 2015, 19:10:43 PM »
Hi,
If different size chart for mens and ladies products then, how could you link different picture?
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
VirtueMart Forum
»
VirtueMart 1.1.x [ Old version - no longer supported ]
»
Themes & Layout Problems and Customization VM 1.1
»
Custom code in product view
We use cookies, just to track visits to our website, we store no personal details.
OK
Learn more