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
  #1  
Old 07-25-2007, 02:17 PM
 
Art lopez Art lopez is offline
 

Newbie
  
Join Date: Apr 2007
Posts: 8
 

Default EZUPSELL 3 column display

I was wondering how to get a 3 column display for EZUPSELL. Currently it only shows up as a one column display. I'm a newbie when it comes to coding.
__________________
X-Cart 4.1.7
X-AOM
X-Special Offers
Reply With Quote
  #2  
Old 07-25-2007, 04:45 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: EZUPSELL 3 column display

Ok -- let's look at how to do this -- a virgin ezupsell will have a loop that's just outside a <tr>

{section name=cat_num loop=$product_links}

then there is a {/section} outside the </tr> -- this basically asks how many product_links there are, and loops until they are done -- but since the loop is OUTSIDE the <tr> it will basically make a list, stackd on top of each other.

IF you were to put the loop just inside the <tr> before the <td>, and then move the {/section} to just before the </tr>, you will now loop <td> cells -- on the same line...

Now, the way I did this was to use some css and make an "ezupsell" lisitng class...so each product gets a thumbnail and a listing.

I would be happy to share my code - but you may want to ask Jon for a version that does what I am suggesting, since it is a commercial mod.

I hope this is enough to get you going here.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 03-22-2008, 02:51 AM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default Re: EZUPSELL 3 column display

Here's a 4.0 version of ezUpsell with a 4-column display. If you want to change the number of columns, change the '{ if %cat_num.index% is div by 4 }' to the number of columns that you require.

You get a thumbnail above the product title for each item.

Code:
{capture name=upsell} <table border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><div align="center">{include file="product_thumbnail.tpl" productid=$product_info.productid image_x=$config.Appearance.thumbnail_width product=$product_info.product tmbn_url=$product_info.tmbn_url}&nbsp;</div></td></tr> <tr> <td valign="top"> <div align="center"><font size="3" face="Arial"><b>{$lng.lbl_you_have_added} {$amount} &quot;{$product_info.product}{if $amount > 1}s{/if}&quot; {$lng.lbl_to_your_shopping_cart}.</b></font> <br /> <font class="Text">What would you like to do now?</font></div></td> </tr> </table> <div align="center"> <table border="0" cellspacing="0" cellpadding="0" width="411" height="43"> <tr> <td width="195" height="43" background="{$ImagesDir}/ez_continueshopping.gif"> <p align="center"><a href="home.php?cat={$product_info.categoryid}&page={$page}"><font color="#FFFFFF" size=2><b>{$lng.lbl_continue|upper}</b></font></a></td> <td width="216" height="43" background="{$ImagesDir}/ez_checkout.gif"> <p align="center"><a href="cart.php"><font color="#FFFFFF" size=2><b>{$lng.lbl_checkout|upper}</b></font></a></td> </tr> </table> </div> <hr noshade size=1> {if $product_links ne ""} <p><font face="Arial" size="2"><b>These products go really well with {$product_info.product}:</b></font></p> {section name=cat_num loop=$product_links} { if %cat_num.first% } <table border=0 width="100%">{/if} { if %cat_num.index% is div by 4 }<tr>{/if} <td style="padding-left:4px;padding-right:4px;padding-top:5px;padding-bottom:5px;" width="25%" align="center" valign="top"><a href="product.php?productid={ $product_links[cat_num].productid }">{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid product=$product_links[cat_num].product tmbn_url=$product_links[cat_num].tmbn_url}</a><br /> <a href="product.php?productid={ $product_links[cat_num].productid }">{ $product_links[cat_num].product|escape}</a></td> { if %cat_num.last% }</tr> </table>{/if} {/section} {/if} <br> {/capture} {include file="dialog.tpl" title=$lng.lbl_productadded content=$smarty.capture.upsell extra="width=100%"}
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #4  
Old 05-24-2008, 07:04 AM
 
paul@dimoda.com.au paul@dimoda.com.au is offline
 

Senior Member
  
Join Date: Aug 2007
Location: Perth, Australia
Posts: 148
 

Default Re: EZUPSELL 3 column display

Does anyone have either, for 4.1, a 1 column display with product description or a multi column layout for version4.Thanks
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5
Reply With Quote
  #5  
Old 05-27-2008, 06:22 AM
 
Lingerieblowout Lingerieblowout is offline
 

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

Default Re: EZUPSELL 3 column display

The above code works great in 4.1.9. for multi products.

Add this product to your cart for an example

http://www.lingerieblowout.com/EM-1987-Charmeuse-Gown-p-22510.html
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #6  
Old 11-05-2008, 07:36 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

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?
__________________
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
  #7  
Old 11-05-2008, 07:58 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

If on a recent x-cart version you can use:

Code:
{if $product_links ne ""} <p><b>{$lng.lbl_with_this_product}:</b></p> {include file="customer/main/products_t.tpl" products=$product_links} {/if}
Reply With Quote
  #8  
Old 11-05-2008, 08:05 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 Jon
If on a recent x-cart version you can use:

Code:
{if $product_links ne ""} <p><b>{$lng.lbl_with_this_product}:</b></p> {include file="customer/main/products_t.tpl" products=$product_links} {/if}

I just tried that but get an error back:
Warning: Division by zero in /shop/var/templates_c/%%29^29F^29F53FB4%%products_t.tpl.php on line 40
Warning: Division by zero in /shop/var/templates_c/%%29^29F^29F53FB4%%products_t.tpl.php on line 161

It does display the title, thumbnail and also the price which is good. I need a buy now button there though as well. Any ideas?
__________________
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
  #9  
Old 11-05-2008, 08:07 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

What is line 40 and 161 of your skin1/customer/main/products_t.tpl?
Reply With Quote
  #10  
Old 11-05-2008, 08:09 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 Jon
What is line 40 and 161 of your skin1/customer/main/products_t.tpl?

Well.....lines 39-42 are as follows:

{if $products[product].product_type ne "C"}
<br />
<br />
{if $active_modules.Subscriptions ne "" and $products[product].catalogprice}

The file ends at line 102!!!

Here it is in full
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="5" cellspacing="1">

{
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}
<
tr>
{
assign var="cell_counter" value=0}
{/if}

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

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

<
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}
<
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>
</
tr>
</
table>
{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>

{
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 }
</
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} 
__________________
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
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 08:30 PM.

   

 
X-Cart forums © 2001-2020