http://www.xykoo.com/Product.asp?id=424 ... =65&menu=1
if you see here there is a size guide when u click the s-m how can i do that for opencart? or a link to a page for it.
You can alter youre product.tpl and add the code to display the sizes-page.
Open catalog/view/theme/YOURE_THEME/template/product/product.tpl
Find:
After that add:
Copy image size.jpg in the folder /image
Copy pagesize.html to the root
Note: Only if the option-name is Size the image with link is shown!
Open catalog/view/theme/YOURE_THEME/template/product/product.tpl
Find:
Code: Select all
<div class="options">
<h2><?php echo $text_option; ?></h2>
<br />
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'select') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<?php if ($option['required']) { ?>
<span class="required">*</span>
<?php } ?>
<b><?php echo $option['name']; ?>:</b><br />
<select name="option[<?php echo $option['product_option_id']; ?>]">
<option value=""><?php echo $text_select; ?></option>
<?php foreach ($option['option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
<?php } ?>
</option>
<?php } ?>
</select>
Code: Select all
<?php if( $option['name'] == 'Size'){ ?>
<script language="javascript" type="text/javascript">
function sizewindow(page) {
NewLeft = (screen.width - 630) / 2;
NewTop = (screen.height - 470) / 2;
window.open(page,"","status=no,scrollbars=yes,resizable=no,width=810,height=570,top="+ NewTop +",left=" + NewLeft);
}</script>
<a id="SizeGuide" href="javascript:sizewindow('pagesize.html', 'SizeGuide', 'status=no,scrollbars=yes,resizable=no,width=810,height=570')"><img src="image/size.jpg" width="60" height="18" border="0"></a>
<?php } ?>
Copy pagesize.html to the root
Note: Only if the option-name is Size the image with link is shown!
Attachments
Unpack, then copy image to image folder, html to root
@ Pprmkr
Thanks for the info on the size chart button. It works for me in Safari but not in Firefox 11 (Mac Os x) where it does not show up at all on the page
I'm using a custom theme but there does not appear to any significant changes done in product.tpl
Any ideas why Firefox can't display it, or perhaps suggest a tweak to fix it?
I really like this and I think it is a real bonus for sales if the customer can immediately see a size chart without leaving the product page.
Hoping you can help.
Dank u Val
Thanks for the info on the size chart button. It works for me in Safari but not in Firefox 11 (Mac Os x) where it does not show up at all on the page
I'm using a custom theme but there does not appear to any significant changes done in product.tpl
Any ideas why Firefox can't display it, or perhaps suggest a tweak to fix it?
I really like this and I think it is a real bonus for sales if the customer can immediately see a size chart without leaving the product page.
Hoping you can help.
Dank u Val
I do not know why Firefox 11 under Mac OS does not display the image and link.Calcite wrote:It works for me in Safari but not in Firefox 11 (Mac Os x) where it does not show up at all on the page
See my screenshot Firefox11 ( Windows 7 ) where it works fine.
I didn't have any luck getting it to work on the custom theme, but it was fine on the default theme.
I gave up because I'm now using several different options.
Next shop I do will be a modified default template so I'll probably use your code - thanks.
I gave up because I'm now using several different options.
Next shop I do will be a modified default template so I'll probably use your code - thanks.
Who is online
Users browsing this forum: No registered users and 279 guests