View Single Post
  #2  
Old 03-05-2006, 06:29 PM
 
Total Hosting Total Hosting is offline
 

Advanced Member
  
Join Date: Feb 2006
Posts: 52
 

Default My cart mods

Ok, both mysteries solved. For sake of the board, I'll post my hacks.

If you want to mod the cart to show the thumbnail-sized image (very handy), simply replace this at line 19 in cart.tpl
Code:
{if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {else} {include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$products[product].image_x image_y=$products[product].image_y product=$products[product].product tmbn_url=$products[product].tmbn_url} {/if}
With this
Code:
{if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {else} {include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} {/if}
I also removed {$products[product].descr} from line 29.

I see no reason to show customers anything but the thumb, title and any options.

To add an update, per line item, you can replace the following around line 59:
Code:
{include file="buttons/delete_item.tpl" href="cart.php?mode=delete&productindex=`$products[product].cartid`"} {if $products[product].product_options ne ''} {if $config.UA.platform eq 'MacPPC' && $config.UA.browser eq 'MSIE'} {include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=400,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');" js_to_href="Y"} {else} {include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=400,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');"} {/if} {/if}
With
Code:
<div style="padding: 8px 0px;"> {if $js_enabled} {include file="buttons/update.tpl" type="input" href="javascript: document.cartform.submit()" js_to_href="Y"} {/if} {include file="buttons/delete_item.tpl" href="cart.php?mode=delete&productindex=`$products[product].cartid`"} {if $products[product].product_options ne ''} {if $config.UA.platform eq 'MacPPC' && $config.UA.browser eq 'MSIE'} {include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=400,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');" js_to_href="Y"} {else} {include file="buttons/edit_product_options.tpl" href="javascript:window.open('`$catalogs.customer`/popup_poptions.php?target=cart&id=`$products[product].cartid`','POptions','width=400,height=350,toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');"} {/if} {/if}</div>
yes, there will be TWO closing DIVs in your cart.tpl with this addition.

Now, I just need to find the hacks to the button templates to replace the text with images. If anyone cares to share, that would be superb!

Hope this helps all that follow.
__________________
Regards,

Peter Stoermer
http://www.TotalHosting.com for http://www.EmpowermentGroup.com
X-cart: 4.0.17
Reply With Quote