View Single Post
  #15  
Old 11-11-2008, 01:27 AM
  SamsonWebDesign's Avatar 
SamsonWebDesign SamsonWebDesign is offline
 

Senior Member
  
Join Date: Oct 2008
Location: East Sussex, UK
Posts: 101
 

Default Re: EZUPSELL 3 column display

Quote:
Originally Posted by SamsonWebDesign
Hi,

I have EZ Upsell installed and I want to add a buy now button to the page and also the short description.
Anyone know how this is done?

I still cannot get an answer to my question about the layout I need to achieve with EZ Upsell. Can anyone help!
I want to recommend a product with a thumbnail, the product title, product description, price and a buy now button.

It should look pretty much the same as the layout in products.tpl but I can't get it to work. I've tried just including products.tpl but that throws up lots of error.

Any ideas?

I have so far done this:
Made a new tpl called products_ez.tpl and this is included on the ezupsell.tpl file as shown below:
PHP Code:
<div align="right">
  <
table border="0" cellspacing="0" cellpadding="0" height="43">
    <
tr>
      <
td height="43"><table align="right" cellpadding="0" cellspacing="0" dir="ltr" onclick="{$js_link}style="cursor: pointer;">
          <
tr>
            <
td width="8" style="background-repeat: repeat-y; background-image: url({$ImagesDir}/flc_but{$sfx}1.gif);"><img src="{$ImagesDir}/spacer.gif" class="BBSide" alt="" /></td>
            <
td height="29" background="{$ImagesDir}/flc_butbg.gif" class="{$bg_title_class}"{$reading_direction_tag}><strong><a href="home.php?cat={$product_info.categoryid}&amp;page={$page}">{$lng.lbl_continue}</a></strong></td>
          {if 
$arrow eq ""}
            {/if}
            <
td width="8" style="background-repeat: repeat-y; background-image: url({$ImagesDir}/flc_but{$sfx}2.gif);"><img src="{$ImagesDir}/spacer.gif" class="BBSide" alt="" /></td>
          </
tr>
      </
table></td>
      <
td width="10">&nbsp;</td>
      <
td height="43"><table align="right" cellpadding="0" cellspacing="0" dir="ltr" onclick="{$js_link}style="cursor: pointer;">
          <
tr>
            <
td width="8" style="background-repeat: repeat-y; background-image: url({$ImagesDir}/flc_but_r1.gif);"><img src="{$ImagesDir}/spacer.gif" class="BBSide" alt="" /></td>
            <
td background="{$ImagesDir}/flc_but_rbg.gif" class="{$bg_title_class}"{$reading_direction_tag}><strong><a href="cart.php">{$lng.lbl_checkout}</a></strong></td>
          {if 
$arrow eq ""}
            <
td background="{$ImagesDir}/flc_but_rbg.gif" class="RedArrow" {$reading_direction_tag}><img src="{$ImagesDir}/rarrow_flc.gif" alt="" /></td>
          {/if}
            <
td width="8" style="background-repeat: repeat-y; background-image: url({$ImagesDir}/flc_but_r2.gif);"><img src="{$ImagesDir}/spacer.gif" class="BBSide" alt="" /></td>
          </
tr>
      </
table></td>
    </
tr>
  </
table>
</
div>
   {
capture name=upsell}
<
br>

<
table border="0" cellpadding="2">
 <
tr>
  <
td valign="top">{if $product_info.is_pimage eq 'W' }{assign var="imageid" value=$product_info.wcm_varid}{else}{assign var="imageid" value=$product_info.productid}{/if}{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$product_info.product tmbn_url=$product_info.pimage_url type=$product_info.is_pimage}&nbsp;</td>
  <
td valign="top">
  <
font class="ProductDetailsTitle" >{$lng.lbl_you_have_added} {$amountcopy of {$product_info.product}{if $amount 1}s{/if}</font><br />
  <
font class="ProductDetailsTitle" >{$lng.lbl_to_your_shopping_cart}.</font>  </td>
 </
tr>
</
table>

<
hr noshade size=1>

{if 
$product_links ne ""}
<
p><font face="Arial" size="2"><b>{$lng.lbl_with_this_product}:</b></font></p>
<
table border=0 cellspacing=0>
{
section name=cat_num loop=$product_links}
<
tr class="ItemsList">
  <
td>{include file="customer/main/products_ez.tpl" products=$product_links}</td>
  <
td valign="top">&nbsp;</td>
</
tr>
{
sectionelse}
<
tr><td></td></tr>
{/
section}
</
table>
{/if}

<
br>
{/
capture}

{include 
file="dialog.tpl" title=$lng.lbl_productadded content=$smarty.capture.upsell extra="width=100%"

My products_ez.tpl file is like this:
PHP Code:
{* $Idproducts_t.tpl,v 1.30.2.12 2008/07/15 12:07:40 ferz Exp $ *}
<
table width="100%" cellpadding="0" cellspacing="0">
<
tr>
    <
td>

<
table width="100%" cellpadding="0" cellspacing="0">

{
math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}

{
section name=product loop=$products}
{
assign var="discount" value=0}

{if %
product.indexis div by $config.Appearance.products_per_row|default:'3'}
<
tr>
{
assign var="cell_counter" value=0}
{/if}

{
math equation="x+1" x=$cell_counter assign="cell_counter" }

    <
td width="{$width}%" class="PListCell">


<
table cellpadding="3" cellspacing="0" width="100%">
<
tr>
    <
td height="100" nowrap="nowrap">
<
a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}">{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$products[product].tmbn_x|default:$config.Appearance.thumbnail_width image_y=$products[product].tmbn_y product=$products[product].product tmbn_url=$products[product].tmbn_url}</a>
{if 
$active_modules.Special_Offers ne "" && $products[product].have_offers && $usertype eq 'C'}
{include 
file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]}
{/if}    </
td>
    <
td valign="top" nowrap="nowrap"><a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}class="ProductTitle">{$products[product].product}</a><br />
{if 
$config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
{
$lng.lbl_sku}: {$products[product].productcode}<br />
{/if}
<
br />
<
br />
{
$products.descr}
{
$products[product].descr}
<
br />
{if 
$printable neq 'Y'}
<
a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}">{$lng.lbl_see_details}</a>
{/if}
{if 
$products[product].product_type ne "C"}
<
br />
<
br />
{if 
$active_modules.Subscriptions ne "" and $products[product].catalogprice}
{include 
file="modules/Subscriptions/subscription_info_inlist.tpl"}
{else}
{if (
$config.General.unlimited_products ne "Y" && ($products[product].avail le 0 or $products[product].avail lt $products[product].min_amount) && $products[product].variantid) or ($products[product].taxed_price ne 0 or ($products[product].variantid && $products[product].variants_has_price) or ($active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""))}
{if 
$products[product].taxed_price ne 0 or ($products[product].variantid && $products[product].variants_has_price)}
{if 
$products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price}
{
math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount}
{if 
$discount gt 0}
&
nbsp;<font class="MarketPrice">{$lng.lbl_market_price}: <s>
{include 
file="currency.tpl" value=$products[product].list_price}
</
s></font><br />
{/if}
{/if}
<
font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</font><br /><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</font>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""},{/if} {$lng.lbl_save_price} {$discount}%{/if}
{if 
$products[product].taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes is_subtax=true}{/if}
{/if}
{if 
$active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""}
{include 
file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]}
{/if}
{else}
<
font class="ProductPrice">{$lng.lbl_enter_your_price}</font>
{/if}
{/if}
{if 
$active_modules.Feature_Comparison ne '' && $products[product].fclassid 0}
<
div align="center" style="width: 100%; padding-top: 10px;">
{include 
file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid}
</
div>
{/if}
{*** 
Uncomment it if you need 'Buy Now' button ***
{if 
$usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include 
file="customer/main/buy_now.tpl" product=$products[product]}
{/if}
*** 
Uncomment it if you need 'Buy Now' button ***}
{/if}</
td>
</
tr>
</
table>

    </
td>

{
capture name=prod_index}
{
math equation="index+x+1" index=%product.indexx=$config.Appearance.products_per_row}
{/
capture}
{if 
$smarty.capture.prod_index is div by $config.Appearance.products_per_row|default:'3' }
</
tr>
{/if}

{/
section}

{if 
$cell_counter lt $config.Appearance.products_per_row}
{
section name=rest_cells loop=$config.Appearance.products_per_row start=$cell_counter}
    <
td class="SectionBox">&nbsp;</td>
{/
section}
</
tr>
{/if}

</
table>
    </
td>
</
tr>
</
table>
{if 
$active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y' && $products_has_fclasses && $js_enabled}
{include 
file="modules/Feature_Comparison/compare_selected_button.tpl"}
{/if} 

It shows the thumbnail, title, price and so on but I can't get it to show the product desription.
I'm trying {$products.descr} and {$products[product].descr} as you will see in the code but neither work.

Anyone know why it won't display the description?
__________________
Versions 4.1.11 to 4.6.4 ... when will the new versions end!

Custom X-Cart driven e-commerce sites, skins and installations at www.samsonwebdesign.co.uk
Reply With Quote