View Single Post
  #30  
Old 03-07-2005, 01:52 PM
  swordmart's Avatar 
swordmart swordmart is offline
 

Advanced Member
  
Join Date: Feb 2005
Posts: 35
 

Default Easy continue shopping botton

I changed the javascript to go back two pages, using this code, I also inserted this in the same place andreas04031 did just gives me a standard button which takes customer back to Category.

Insert this
Code:
<TD align="right"><TABLE border="0" cellspacing="0" cellpadding="0" onclick="javascript: history.go(-2)" style="cursor: pointer;" valign="middle"> <TR><TD>[img]{$ImagesDir}/but1.gif[/img]</TD> <TD class="Button" valign="middle" nowrap><FONT class="Button">Continue shopping</FONT></TD> <TD>[img]/{$ImagesDir}/but2.gif[/img]</TD></TR> </TABLE>

Above This in your /customer/main/cart.tpl
Code:
<TD align="right"> {include file="buttons/button.tpl" button_title=$lng.lbl_checkout style="button" href="cart.php?mode=checkout"} </TD>

or if you dont have any mods on cart.tpl just replace cart.tpl with this:
Code:
{* $Id: cart.tpl,v 1.74.2.9 2004/12/14 08:24:21 svowl Exp $ *} <H3>{$lng.lbl_your_shopping_cart}</H3> {$lng.txt_cart_header} {if $active_modules.Gift_Certificates ne ""} {$lng.txt_cart_note} {/if} {capture name=dialog} {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/cart_offers.tpl"} {/if} {if $products ne ""} <FORM action="cart.php" method="post" name="cartform"> <TABLE border="0" width="100%"> {section name=product loop=$products} {if $products[product].hidden eq ""} <TR><TD width="90" align="center" valign="top"> {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} </TD> <TD valign="top"> <FONT class="ProductTitle">{$products[product].product}</FONT> <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"><TR><TD> {$products[product].descr} </TD></TR></TABLE> {if $products[product].product_options ne ""} {$lng.lbl_selected_options}: <TABLE> {foreach from=$products[product].product_options item=v} <TR> <TD>{$v.class}:</TD> <TD>{$v.option_name}</TD> </TR> {/foreach} </TABLE> {/if} {assign var="price" value=$products[product].display_price} {if $active_modules.Product_Configurator ne "" and $products[product].product_type eq "C"} {include file="modules/Product_Configurator/pconf_customer_cart.tpl" main_product=$products[product]} {assign var="price" value=$products[product].pconf_display_price} {/if} <DIV align="left"> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice and $products[product].product_type ne "C"} {include file="modules/Subscriptions/subscription_priceincart.tpl"} {else} {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/cart_price_special.tpl"} {/if} <FONT class="ProductPriceConverting">{include file="currency.tpl" value=$price} x {if $active_modules.Egoods and $products[product].distribution}1<INPUT type="hidden"{else}<INPUT type="text" size=3{/if} name="productindexes[{$products[product].cartid}]" value="{$products[product].amount}"> = </FONT><FONT class="ProductPrice">{math equation="price*amount" price=$price amount=$products[product].amount format="%.2f" assign=unformatted}{include file="currency.tpl" value=$unformatted}</FONT><FONT class="MarketPrice"> {include file="customer/main/alter_currency_value.tpl" alter_currency_value=$unformatted}</FONT> {if $config.Taxes.display_taxed_order_totals eq "Y" and $products[product].taxes} {include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes} {/if} {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/cart_free.tpl"} {/if} {/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> </TD></TR> <TR><TD colspan="2"><HR size="1" noshade></TD></TR> {/if} {/section} </TABLE> {if $active_modules.Gift_Certificates ne ""} {include file="modules/Gift_Certificates/gc_cart.tpl" giftcerts_data=$cart.giftcerts} {/if} {include file="customer/main/cart_totals.tpl"} {if $js_enabled} <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <TR> <TD> {include file="buttons/update.tpl" type="input" href="javascript: document.cartform.submit()" js_to_href="Y"} {include file="buttons/button.tpl" button_title=$lng.lbl_clear_cart href="cart.php?mode=clear_cart"} </TD> {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/cart_checkout_buttons.tpl"} {/if} <TD align="right"><TABLE border="0" cellspacing="0" cellpadding="0" onclick="javascript: history.go(-2)" style="cursor: pointer;" valign="middle"> <TR><TD>[img]/xcart/skin1/images/but1.gif[/img]</TD> <TD class="Button" valign="middle" nowrap><FONT class="Button">Continue shopping</FONT></TD> <TD>[img]/xcart/skin1/images/but2.gif[/img]</TD></TR> </TABLE> <TD align="right"> {include file="buttons/button.tpl" button_title=$lng.lbl_checkout style="button" href="cart.php?mode=checkout"} </TD> </TR> </TABLE> {else} <INPUT type="hidden" name="mode" value="checkout"> {include file="submit_wo_js.tpl" value=$lng.lbl_checkout} {/if} </FORM> {else} {$lng.txt_your_shopping_cart_is_empty} {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_items content=$smarty.capture.dialog extra="width=100%"} {if $cart.coupon_discount eq 0 and $products ne ""} {if $active_modules.Discount_Coupons ne ""} {include file="modules/Discount_Coupons/add_coupon.tpl} {/if} {/if}

Thanks to andreas04031

viewable on my store (not live) http://shop.swordmart.co.uk
__________________
X-cart 4 gold
PHP version 4.3.10
MySQL version 4.0.23-standard
Apache version 1.3.33 (Unix)
Reply With Quote