X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Layout of Product Description (https://forum.x-cart.com/showthread.php?t=38407)

ScrapProfessor 03-18-2008 03:21 PM

Layout of Product Description
 
Hi guys! It's me again. LOL ;)

I have one question that I need answered. On the Product Details page I would like the Product Description and Details to all appear just below the Product Image. What do I need to change/modify to make this happen?

Thank you for your support! :)

Yurij 03-19-2008 03:17 AM

Re: Layout of Product Description
 
1 Attachment(s)
Quote:

Originally Posted by ScrapProfessor
Hi guys! It's me again. LOL ;)

I have one question that I need answered. On the Product Details page I would like the Product Description and Details to all appear just below the Product Image. What do I need to change/modify to make this happen?

Thank you for your support! :)


Pages product structure shown in the figure:


Attachment 841

You need to change the file "skin1\customer\main\product.tpl".

Part of the code, which is responsible for the left side of the withdrawal - an image product (in the picture is left square turquoise color):

PHP Code:

<table width="100%">
<
tr>
    <
td class="PImgBox" rowspan="2">
{* 
START IMAGES *}
{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"}&nbsp;
{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"}&nbsp;
{/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}
{* /
START IMAGES *}
    </
td



Part of the code, which is responsible for the withdrawal right side (in the picture is right square turquoise color).

PHP Code:

{* /START IMAGES *}
    </
td>
    <
td valign="top" width="100%">

<
table width="100%" cellspacing="0" cellpadding="0">
<
tr>
    <
td>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}</td>


.......................
.......................
<
br /><br />
</
td>
</
tr></table>
</
td>
</
tr>
</
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} 


toolexperts 03-19-2008 05:23 AM

Re: Layout of Product Description
 
would you replace the code with this or remove this coding?

Yurij 03-19-2008 06:53 AM

Re: Layout of Product Description
 
2 Attachment(s)
Quote:

Originally Posted by toolexperts
would you replace the code with this or remove this coding?


You have to change the code for your needs.
I showed where yuor need to change the code.

for example:

If we replace
PHP Code:

<table width="100%">
<
tr>
    <
td class="PImgBox" rowspan="2">
{* 
START IMAGES *}
{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"}&nbsp;
{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"}&nbsp;
{/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}
{* /
START IMAGES *}
    </
td>
    <
td valign="top" width="100%">

<
table width="100%" cellspacing="0" cellpadding="0">
<
tr>
    <
td>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}</td>
{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_pricestyle="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}
&
nbsp;<span id="save_percent">{ $discount }</span>%
    </
td>
</
tr>
</
table>

    </
td>
{/if} 


on this code:
PHP Code:

<table width="100%">
<
tr>
    <
td class="PImgBox" rowspan="2">

    </
td>
    <
td valign="top" width="100%">
<
table width="100%" cellspacing="0" cellpadding="0">
<
tr>
    <
td>
{* 
START IMAGES *}
{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"}&nbsp;
{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"}&nbsp;
{/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}
{* /
START IMAGES *}


    </
td>
    <
td>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}</td>
{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_pricestyle="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}
&
nbsp;<span id="save_percent">{ $discount }</span>%
    </
td>
</
tr>
</
table>

    </
td>
{/if} 



It was like this:
Attachment 846

We will get next result:
Attachment 845


I just moved the code responsible for the withdrawal of the picture and added a column to the table.

ScrapProfessor 03-19-2008 08:01 AM

Re: Layout of Product Description
 
Perfect! Thank you so much! :)

toolexperts 03-24-2008 05:27 AM

Re: Layout of Product Description
 
yurij,

I'd like to put the add to cart and add to wishlist at the top the move everything else up. Finally, I'd like to have the description run under that and run full length of page, i have tried modifying to do so yet when i made the table all text stayed to the right instead of centering

ScrapProfessor 04-16-2008 08:20 AM

Re: Layout of Product Description
 
I'm going to bump this because I also would like my product description text BELOW the product images.

Thank you! :)

kube 04-16-2008 09:56 AM

Re: Layout of Product Description
 
Hi Joli,

Maybe this might help. Get your skin1/customer/main/product.tpl (make sure you make a backup of it too) and locate the line that displays your text similar to below and {* comment it out *} (including each TD tag)...

<TD>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</TD>

And underneath that line of code there's another TD that displays your savings label, add a colspan="2" to it like so...

<td colspan="2" align="right" valign="top" width="60" id="save_percent_box"...

Then copy your description text that was commented out between the TD tags (which may look like something like below)...

{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}

Then locate the closing </TD> of <td class="PImgBox" rowspan="2"> which should be a few lines above from where we commented out the description text.

And above the closing </td> add a <br /> tag and paste below it the line we copied with the description text (so it should look something like)...

<br />
{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}

The resulting image TD with the newly added description text should look something like...
Code:

<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'}
bla bla bla image stuff...
{/if}

<br />
{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}
</td>


Tell us how you got on...
Hope this helps.

Yurij 04-17-2008 12:35 AM

Re: Layout of Product Description
 
Quote:

Originally Posted by toolexperts
yurij,

I'd like to put the add to cart and add to wishlist at the top the move everything else up. Finally, I'd like to have the description run under that and run full length of page, i have tried modifying to do so yet when i made the table all text stayed to the right instead of centering


By the button "Add to cart" refers additional field - number of the product.


Where should we move this field?

PS. If you put a picture - as it should be, it would be easier to help.


All times are GMT -8. The time now is 06:51 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.