Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

EZUPSELL 3 column display

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #11  
Old 11-05-2008, 09:13 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: EZUPSELL 3 column display

Try this. Find:

$config.Appearance.products_per_row

change to

$config.Appearance.products_per_row|default:'3'
Reply With Quote
  #12  
Old 11-05-2008, 09:23 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

Thanks for that. I replaced that line twice in the code in 2 areas and it works fine now.

Any ideas on getting a Buy Now button into the layout?
__________________
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
  #13  
Old 11-05-2008, 11:42 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: EZUPSELL 3 column display

FIND:

Code:
{*** 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 ***}


Replace with:

Code:
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if}


And ensure buy now buttons are enabled in your General Settings -> Appearance admin section.
Reply With Quote
  #14  
Old 11-05-2008, 12:45 PM
  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

That has almost worked and I see the buy now button but there is a long error message and a quantity box which is empty appearing.

uantity Warning: Smarty error: math ``x/y'' in ``customer/home.tpl'': parameter ``y'' is empty in /shop/Smarty-2.6.19/Smarty.class.php on line 1092

http://dev.impublications.com/shop/skin1/images/but1.gifBuy Nowhttp://dev.impublications.com/shop/skin1/images/but2.gif
__________________
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
  #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
  #16  
Old 11-11-2008, 05:13 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: EZUPSELL 3 column display

Try this: {$product_info.product}
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #17  
Old 11-11-2008, 05:47 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 Lingerieblowout
Try this: {$product_info.product}

That just gave me the title of the product I have added to the cart but thanks for trying.
I need the description of the recommended product I am upselling.

http://dev.impublications.com/shop/added.php?cat=0&productid=16187&amount=1&page=1
__________________
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
  #18  
Old 11-11-2008, 06:40 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: EZUPSELL 3 column display

Sorry ..

{$product_info.fulldescr}

or

{$product_info.descr}
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #19  
Old 11-11-2008, 07:03 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 Lingerieblowout
Sorry ..

{$product_info.fulldescr}

or

{$product_info.descr}

That's it!
Thanks so much for that little gem. Was driving me mad!
__________________
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
  #20  
Old 11-11-2008, 07:24 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default Re: EZUPSELL 3 column display

No problem .. Sometimes the easy ones are the hardest !! ... hehe
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:49 AM.

   

 
X-Cart forums © 2001-2020