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

Continue Shopping

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 01-13-2005, 07:47 AM
 
PersonalizedFitness PersonalizedFitness is offline
 

Advanced Member
  
Join Date: Oct 2004
Location: Omaha, Nebraska
Posts: 93
 

Default

Elomibao, on that last piece of code you posted ... what tpl did you apply that too ?

Thanks
__________________
http://www.VitaManCafe.com
There is Nothing \"General\" about our Nutrition Center!
X-Cart version 3.5.1 | Operation System Linux

http://www.exercisewisdom.com
X-Cart Gold Version 4.0.1 | Operation System Linux
Reply With Quote
  #22  
Old 01-16-2005, 06:28 PM
 
elomibao elomibao is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default

Quote:
Originally Posted by PersonalizedFitness
Elomibao, on that last piece of code you posted ... what tpl did you apply that too ?

Thanks

The last one? cart.php

roccons,

You're right. The solution I posted will have the Continue Shopping button taken out once a product has been removed from the cart.
__________________
X-Cart Pro 4.0.5
Fedora Core 2
Apache 2.x/PHP 4.x
MySQL 3.x
Reply With Quote
  #23  
Old 01-28-2005, 10:37 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Elomibao - you listed "Redirect" code in an earlier post. Where do I find this code to make the change you suggested?

Thanks,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #24  
Old 01-28-2005, 10:34 PM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

I've created a mod that uses a redirect landing page which makes it clear the product was added, gives them the option to continue shopping, checkout, and uses the links you set in upselling to encourage them to purchase the related products.

For more information or to demo visit:

http://www.websitecm.com/store/customer/product.php?productid=84
Reply With Quote
  #25  
Old 01-30-2005, 07:28 PM
 
elomibao elomibao is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default

jkirkpatrick,

In cart.php, look for this chuch of code:

Code:
# # Redirect # if($mode=="add" and $productid) { if($config["General"]["redirect_to_cart"]=="Y") { func_header_location("cart.php"); } else{ if(!empty($HTTP_REFERER)) { func_header_location($HTTP_REFERER); } else { func_header_location("home.php?cat=$cat&page=$page"); } } }

replace:
Code:
func_header_location("cart.php");

with:
Code:
func_header_location("cart.php?mode=added");

Jon,

Interesting solution. You don't get redirected to a cart but a page that allows you to continue shopping or checkout. There are advantages and disadvantages to this. It's all up to them what to implement. Nice work.
__________________
X-Cart Pro 4.0.5
Fedora Core 2
Apache 2.x/PHP 4.x
MySQL 3.x
Reply With Quote
  #26  
Old 02-16-2005, 01:32 AM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Default

well, I think many of these solutions are not working or too complicated. I just added to customer/main/cart.tpl the following code:
Code:
<TD align="right"><TABLE border="0" cellspacing="0" cellpadding="0" onclick="javascript: self.location='home.php'" style="cursor: pointer;" valign="middle"> <TR><TD>[img]/cart/skin1/images/but1.gif[/img]</TD> <TD class="Button" valign="middle" nowrap><FONT class="Button">Continue shopping</FONT></TD> <TD>[img]/cart/skin1/images/but2.gif[/img]</TD></TR> </TABLE>

right above the code

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

it is in around line 99 in my file (version 4.0.11).

This is the original xcart code from the invoice page, there is already a Continue Shopping button.

Andy
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #27  
Old 02-17-2005, 06:37 PM
 
elomibao elomibao is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default

Your solution only redirects the shopper to the home page. Not exactly what other people wanted. Some people wanted to get redirected to the last Category they shoped from. No sense in going back to the home page and re-clicking the categories to get back to where you came from.

Again, it's up to them what to implement. And I think some of the solutions posted above are pretty straight forward and very easy to implement.
__________________
X-Cart Pro 4.0.5
Fedora Core 2
Apache 2.x/PHP 4.x
MySQL 3.x
Reply With Quote
  #28  
Old 02-17-2005, 07:43 PM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Default

Well, I wasn't critizising the other solutions, they are actually pretty neat but with some drawbacks.
I just look at this:
Quote:
You can update as many times as you wish without added history steps (because the action is not really a page reload but a form submition).
The problem appears only when deleting items. + Buy Now code in templates must be disabled
= something is not working and buy now must be disabled.

Quote:
...but it doesn't work the same way in Opera
= not working for opera visitors

= loads the very first page, well... we don't have to let them go that far back

Why do we assume the visitor want to go back to the same category he came from? We don't know that for sure but we know for sure if he want's to resume shopping he want's to stay in the shop, not in the very first page but in the shop.

Again, all solutions may work well in one or another way, to make sure it works in all cases - no matter what browser is used - let them go with a simple link back to the shop start page.

I think we all agree: this shouldn't be any matter for a custom mod, this should be included in the standard XC code as many other nice and smart solutions we all can find in this forum - it is not my intetion to make any code looking bad, if you and all the other ones felt that way... I apologize, I just wanted to add another, very simple and "works always" solution, Andy
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #29  
Old 02-17-2005, 10:29 PM
 
elomibao elomibao is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default

Sorry if I sound as if I was offended. I wasn't. If you look at my first reply on this thread (located on the first page), there were conditions and situations where I mentioned how shopping should work the way I wanted it. If an x-cart user wanted the same thing, then good. If not, it's good also because there were other solutions that we're available.

It's all good.
__________________
X-Cart Pro 4.0.5
Fedora Core 2
Apache 2.x/PHP 4.x
MySQL 3.x
Reply With Quote
  #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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:36 PM.

   

 
X-Cart forums © 2001-2020