![]() |
moving details area above description in product.tpl
Hi all, I am trying to move thesnippet of code that has the product details such as price, add to cart, add to wishlist above the description area in product.tpl, can someone offer advice on how to do this?
|
Re: moving details area above description in product.tpl
since I am not the greatest at explaining what I am trying to do I have afixed a jpg showing what I want to do.
http://216.75.30.97/skin1/images/move.JPG |
Re: moving details area above description in product.tpl
It would actually be easier to move the description instead of the rest. Just move this:
{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if} to where you want it to appear in the template. |
Re: moving details area above description in product.tpl
http://216.75.30.97/skin1/images/move1.JPGok I have moved it...now the text looks like this, how can i make it image wrap or start below the image?
|
Re: moving details area above description in product.tpl
The image is in its own cell, so you'd need to create a new row that spans both cells if you want it to go all the way across.
|
Re: moving details area above description in product.tpl
would that be done using <tr>? Sorry not the best at code.....
|
Re: moving details area above description in product.tpl
<tr><td colspan="2">description here</td></tr>
|
Re: moving details area above description in product.tpl
Ok now the quantity selector is down at the bottom by itself....
|
Re: moving details area above description in product.tpl
You must have pasted the code too early then...make sure you add the new row after the closing </tr> of the main row.
|
Re: moving details area above description in product.tpl
ok got it set right, however it acts like there is a box or something there preventing it from spreading out under the pic....to see what i mean http://216.75.30.97/environmental-testing/low-e-glass-detector/low-e-detector/tdgd.html
|
Re: moving details area above description in product.tpl
you need to make sure it is outside the add to cart/wishlist/quantity table. There are tables inside tables in that template...you need to insert the new <tr> after the very last </tr> on teh page.
|
Re: moving details area above description in product.tpl
Balinor, I have tried what you told me to still it just sends everything to the right....is there any way if i posted my code you could tell me what i am doing wrong?
|
Re: moving details area above description in product.tpl
Post it and I'll have a look.
|
Re: moving details area above description in product.tpl
<td class="PImgBox" rowspan="2">
{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'} {include file="modules/Detailed_Product_Images/popup_image.tpl"} {elseif $product.force_image_type eq 'W' && $product.variantid} {include file="product_thumbnail.tpl" productid=$product.variantid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="W"} {else} {include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"} {/if} {if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'} {include file="modules/Magnifier/popup_magnifier.tpl"} {/if} </td> <td valign="top" width="100%"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> {if $product.taxed_price gt 0 and $product.list_price gt 0} <td align="right" valign="top" width="60" id="save_percent_box"{if $product.taxed_price >= $product.list_price} style="display: none;"{/if}> <table width="60" cellspacing="1" cellpadding="2"> <tr> <td class="SaveMoneyLabel"> <br /> {math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount} <span id="save_percent">{ $discount }</span>% </td> </tr> </table> </td> {/if} </tr> </table> <p /> <table width="100%" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><b><font class="ProductDetailsTitle">{$lng.lbl_details}</font></b></td></tr> <tr><td class="Line" height="1" colspan="2"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td></tr> <tr><td colspan="2"> </td></tr> <tr> <td width="30%">{$lng.lbl_sku}</td> <td nowrap="nowrap" id="product_code">{$product.productcode}</td> </tr> {if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <tr> <td width="30%">{$lng.lbl_in_stock}</td> <td nowrap="nowrap" id="product_avail_txt"> {if $product.avail gt 0}{$lng.txt_items_available|substitute:"items":$pr oduct.avail}{else}{$lng.lbl_no_items_available}{/if} </td> </tr> {/if} {if $product.weight ne "0.00" || $variants ne ''} <tr id="product_weight_box"> <td width="30%">{$lng.lbl_weight}</td> <td nowrap="nowrap"><span id="product_weight">{$product.weight|formatprice}< /span> {$config.General.weight_symbol}</td> </tr> {/if} {if $active_modules.Extra_Fields ne ""} {include file="modules/Extra_Fields/product.tpl"} {/if} {if $active_modules.Feature_Comparison ne ""} {include file="modules/Feature_Comparison/product.tpl"} {/if} {if $active_modules.Subscriptions ne "" and $subscription} {include file="modules/Subscriptions/subscription_info.tpl"} {else} <tr><td class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</td> <td valign="top"> {if $product.taxed_price ne 0 || $variant_price_no_empty} <font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">{include file="currency.tpl" value=$product.taxed_price plain_text_message=true}</span></font><font class="MarketPrice"> <span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true}</span></font> {if $product.taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if} {else} <input type="text" size="7" name="price" /> {/if} </td> </tr> {/if} </table> <p /> <table width="100%" cellpadding="0" cellspacing="0"> <tr><td colspan="2"> <b><font class="ProductDetailsTitle">{$lng.lbl_options}</font></b> </td></tr> <tr><td class="Line" height="1" colspan="2"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td></tr> <tr><td colspan="2"> </td></tr> {if $active_modules.Product_Options ne ""} { include file="modules/Product_Options/customer_options.tpl"} {/if} <tr><td height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1}<br /><font class="ProductDetailsTitle">{$lng.txt_need_min_amo unt|substitute:"items":$product.min_amount}</font>{/if}</td> <td> {if $config.General.unlimited_products eq "N" and ($product.avail le 0 or $product.avail lt $product.min_amount) and $variants eq ''} <script type="text/javascript" language="JavaScript 1.2"> <!-- var min_avail = 1; var avail = 0; var product_avail = 0; --> </script> <b>{$lng.txt_out_of_stock}</b> {else} {if $config.General.unlimited_products eq "Y"} {assign var="mq" value=$config.Appearance.max_select_quantity} {else} {math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"} {if $tmp<2} {assign var="minamount" value=$product.min_amount} {else} {assign var="minamount" value=1} {/if} {math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail} {/if} {if $product.distribution eq "" and !($active_modules.Subscriptions ne "" and $subscription)} {if $product.min_amount le 1} {assign var="start_quantity" value=1} {else} {assign var="start_quantity" value=$product.min_amount} {/if} {if $config.General.unlimited_products eq "Y"} {math equation="x+y" assign="mq" x=$mq y=$start_quantity} {/if} <script type="text/javascript" language="JavaScript 1.2"> <!-- var min_avail = {$start_quantity|default:1}; var avail = {$mq|default:1}-1; var product_avail = {$product.avail|default:"0"}; --> </script> <select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}> {section name=quantity loop=$mq start=$start_quantity} <option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%} selected="selected"{/if}>{%quantity.index%}</option> {/section} </select> {else} <script type="text/javascript" language="JavaScript 1.2"> <!-- var min_avail = 1; var avail = 1; var product_avail = 1; --> </script> <font class="ProductDetailsTitle">1</font><input type="hidden" name="amount" value="1" /> {if $product.distribution ne ""}{$lng.txt_product_downloadable}{/if} {/if} {/if} </td></tr> <tr><td colspan="2"> <input type="hidden" name="mode" value="add" /> {include file="customer/main/product_prices.tpl"} {if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)} {if $js_enabled} <br /> {if $product.forsale ne "B"} <table cellspacing="0" cellpadding="0"> <tr> <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td> <td> </td> <td> {if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""} {include file="customer/add2wl.tpl"} {/if} </td> </tr> </table> {else} {$lng.txt_pconf_product_is_bundled} {/if} {if $smarty.get.pconf ne "" && $active_modules.Product_Configurator} <br /><br /> <input type="hidden" name="slot" value="{$smarty.get.slot}" /> <input type="hidden" name="addproductid" value="{$product.productid}" /> {include file="buttons/button.tpl" button_title=$lng.lbl_pconf_add_to_configuration style="button" href="javascript:if (FormValidation()) `$ldelim`document.orderform.productid.value='`$sma rty.get.pconf`';document.orderform.action='pconf.p hp';document.orderform.submit()`$rdelim`"} {if $config.General.unlimited_products ne "Y" && $product.pconf_avail le 0} <br /> <font class="Message"><b>{$lng.lbl_note}:</b> {$lng.lbl_pconf_slot_out_of_stock_note}</font><br /> {/if} <br /> {$lng.txt_add_to_configuration_note} <br /> {/if} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_add_to_cart} {/if} {/if} {if $active_modules.Feature_Comparison ne ""} {include file="modules/Feature_Comparison/product_buttons.tpl"} {/if} <br /><br /> </td> </tr></table> </td> </tr><td>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</td> </table> <input type="hidden" name="productid" value="{$product.productid}" /> <input type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}" /> <input type="hidden" name="page" value="{$smarty.get.page|escape:"html"}" /> </form> {/capture} {include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra='width="100%"'} {/if} {if $active_modules.Magnifier ne "" && ($config.Magnifier.magnifier_image_popup ne 'Y' || $js_enabled ne 'Y')} <p /> {include file="modules/Magnifier/product_magnifier.tpl" productid=$product.productid} {/if} {if $config.Appearance.send_to_friend_enabled eq 'Y'} <p /> {include file="customer/main/send_to_friend.tpl" } {/if} {if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')} <p /> {include file="modules/Detailed_Product_Images/product_images.tpl" } {/if} {if $active_modules.Upselling_Products ne ""} <p /> {include file="modules/Upselling_Products/related_products.tpl" } {/if} {if $active_modules.Recommended_Products ne ""} <p /> {include file="modules/Recommended_Products/recommends.tpl" } {/if} {if $active_modules.Customer_Reviews ne ""} <p /> {include file="modules/Customer_Reviews/vote_reviews.tpl" } {/if} {if $active_modules.Product_Options ne '' && $product_options ne '' && ($product.product_type ne "C" || !$active_modules.Product_Configurator)} <script type="text/javascript" language="JavaScript 1.2"> <!-- check_options(); --> </script> {/if} |
Re: moving details area above description in product.tpl
As I said before, it is because you didn't set the table cell you created to be a new row and to span both columns. Replace this:
</tr><td>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</td> </table> with this: </tr> <tr><td colspan="2">{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</td></tr> </table> |
Re: moving details area above description in product.tpl
ok did that yet the text still is moving all to the right side could there be a place somewhere that is causing all this text to go right instead of center?
|
Re: moving details area above description in product.tpl
and again i apologise for being a pain...these are thing my "powers" to be keep saying are high priority before we go live
|
Re: moving details area above description in product.tpl
Did you clear your template cache after making the change? If you use that code, it will create a new row beneath your thumbnail and details spanning all the way across the table.
|
Re: moving details area above description in product.tpl
clear the template cache is that cleanup.php? sorry :)
|
Re: moving details area above description in product.tpl
ok i did that the space is there yet the text still is hugging the left, is there a way to make it hug the left and spread out?
|
Re: moving details area above description in product.tpl
Got a url so I can see waht you are talking about?
|
Re: moving details area above description in product.tpl
|
Re: moving details area above description in product.tpl
You sure you posted the right code? Make sure the table row code I posted goes right before the FINAL closing table tag...that looks like you have it before the second to last table tag.
|
Re: moving details area above description in product.tpl
maybe change <td class="PImgBox" rowspan="2"> with the new code from Balinor
to... <td class="PImgBox"> does that do it? |
Re: moving details area above description in product.tpl
kube...you nailed it!!! Thanks guys!!!
|
Re: moving details area above description in product.tpl
I thought this may help someone looking for product description layout in version 4.0.19.
I followed the instructions above 1.moved this <tr><td colspan="2">{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</td></tr> and put it after the last </tr> However ,this just moved the product details next to the picture and left a long column of description sitting in the middle of the page and I wanted it to extend under the left column. So I added <table> as below <table><tr><td colspan="1">{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</td></tr> but I didnt close with </table> and everything is looking great.Text now aligns left under picture .(closing with </table> just thru all the other tables out of alignment ). |
Re: moving details area above description in product.tpl
Thanks for the code gang, I like the small adjustment.
|
All times are GMT -8. The time now is 04:14 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.