X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Continue Shopping (https://forum.x-cart.com/showthread.php?t=873)

Kanyon71 12-04-2002 12:41 PM

Continue Shopping
 
I did a search on every way I could think of but didn't find anything. I need to add a button in the catalog that says Continue Shopping after you have added items to your cart. Any ideas on how I can do this? I want it to take you back to where you where last shopping.

shan 12-04-2002 01:54 PM

Theres a couple of things that you could do ...

Either unset Redirect customer to cart in general settings to stop the customer giong to the view catr page when they add a product

or

create a new button file called continue_shopping.tpl that contains the following code.


the (-2) part is how many steps you wish to take them backwards. (-1) would take them back to the last product detail page or (-2) would move them back 2 steps and thus go to the products list page.

Now where ever you want that to appear just add this code ...

Quote:

{include file="buttons/continue_shopping.tpl"}

Its not perfect but it does the job most of the time

Cefko 12-05-2002 04:20 AM

Which is best practice? To send them to cart when they "add" or not to send them to cart?

shan 12-05-2002 04:24 AM

up to you I suppose but I reckon its best to show them the cart after choosing a product just so that they know its been added and dont try and add it again

Kanyon71 12-05-2002 05:55 AM

Ok I am feeling pretty stupid about right now, where do I need to put the code to call this? I am not sure which file is getting called to display what you are seeing after adding a product.

shan 12-05-2002 06:00 AM

if you switch on the debug console in your admin area you should see what tpl files are being loaded for each page.

Im pretty sure that want to be looking at cart.tpl though

Kanyon71 12-05-2002 06:43 AM

Yeah it was, I found it after a little digging, had a brain lock when I was typing. :D

parmar 03-30-2004 12:12 AM

Ok, this is a very old post I'm replying to, but I'm thinking of adding "continue shopping" button at the View Cart and Checkout stage.

I have tried to work with by disabling "redirect customer to cart" and although I have three "view Cart" and "checkout" links on our pages, customers seems to be getting confused once they add an item to cart, and when the shop doesn't direct them to a cart iteself after adding that item. I find that surprising but hey, customers are alway right.

What I need to do is redirect customers to the Category they were at and not direct them always to the last page they were at. Sometimes a customer will choose to see a product page and than add that product to a cart, or they may add an item using "Buy now" from within the Catagory pages. (-1) setting will redirect them to the last page they were at, which will be fine if they were on Catagory page, but if they added an item at Product page this will redirect them back to that product page. I wish them to be redirected to the Catagory page always. How do I go on about implimenting this?

GM 04-30-2004 04:59 PM

TRY THIS...

1:) Create a new button file in /buttons called

continue_shopping.tpl that contains the following code:

Code:

{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shop}

2:) In Admin go to "languages" edit languages and create a new

entry called "lbl_continue_shop" (without the quotes)

Now in cart.tpl or where ever you want the button to appear just add this

code:


DONE!

longhorn180 05-24-2004 05:51 AM

I could'nt get these methods to work, so I tried something that is pretty much what was suggested above, but without the tpl file. I just created a label called lbl_continue_shop with text reading Click Here to Continue Shopping and added this code to customer/main/cart.tpl below the checkout and submit labels and below the your shopping cart is empty labels:


{$lng.lbl_continue_shop}



This works great for me.


All times are GMT -8. The time now is 11:50 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.