| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Continue Shopping | ||||
|
|
Thread Tools | Search this Thread |
#61
|
|||||||
|
|||||||
Thank you again, it is much appreciated your patience and continued responses. From all initial tests, it is working great.
__________________
-------------------------- X-cart ver 4.0.16 |
|||||||
#62
|
|||||||||
|
|||||||||
I ended up using the code supplied by xgarb, but I found that I had to modifiy the continue_shopping.tpl from
{* source: http://forum.x-cart.com/viewtopic.php?t=1124 *} {if $goto eq "product" and $last_productid neq ""} {assign var="href" value="`$WebDir`/product.php?productid=`$last_productid`"} {elseif $last_cat neq ""} {assign var="href" value="`$WebDir`/home.php?cat=`$last_cat`"} {else} {assign var="href" value="`$http_location`"} {/if} [img]{$ImagesDir}/buttons/continue_shopping.gif[/img] to {* source: http://forum.x-cart.com/viewtopic.php?t=1124 *} {if $goto eq "product" and $last_productid neq ""} {assign var="href" value="`$WebDir`product.php?productid=`$last_produ ctid`"} {elseif $last_cat neq ""} {assign var="href" value="`$WebDir`home.php?cat=`$last_cat`"} {else} {assign var="href" value="`$WebDir`home.php"} {/if} {include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping style="button" href="$href"} The reason? What if the customer wasn't in a category before clicking the 'continue shopping' button? I found it was going the home page, which in my case is index.html, so I made it go to home.php instead. I'm not sure if the code is exactly right, but it works
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#63
|
|||||||||
|
|||||||||
Quote:
I tried to implement this code. Made the button continue_shopping.tpl and added it into cart.tpl. But when I click on the button I'm send back to home.php, and not the category where I am from. So it doesn't work.
__________________
Best regards, Niki Buitenrust Hettema X-Cart Gold 4.1.8 (Live & Loaded) Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more... |
|||||||||
#64
|
|||||||
|
|||||||
Hi. I'm having a problem where if I buy a product featured on home.php and then click 'Continue Shopping' instead of taking me back to home.php it takes me to a category.
If I go to home.php, 'buy now' and then click 'continue shopping' it goes to home.php?cat=360 instead of home.php. Even though I've never even looked at home.php?cat=360. If I browse a category (for example home.php?cat=527) and then go back to home.php and 'buy now' and then click 'continue shopping' it goes to home.php?cat=527 instead of home.php. I've tried both xgarb and JWait's versions and the same thing happens. Any help would be most appreciated... thanks.
__________________
X-Cart version 4.0.13 (unix) |
|||||||
#65
|
|||||||
|
|||||||
Nightfre, I guess you did this bit as well?
Quote:
groovedis, I think it's to do with the cats that the 'featured items' on the homepage are from. Not sure how you'd fix it, or if it's really worth worrying about.
__________________
Core version: 5.5.xx |
|||||||
#66
|
|||||||
|
|||||||
Quote:
and for those of us who want to use our own custom button, use balinor's fix in this post: http://forum.x-cart.com/viewtopic.php?t=12078&highlight=buy+image
__________________
version: 4.4.1 Gold [Unix] |
|||||||
#67
|
|||||||
|
|||||||
There are so many posts in this thread, I'm sorry, but I do not understand most of them. Either it's not clear what files to make change or there are reported problems or the post is so old I don't want to try it on my version.
Can someone, obviously smarter than me, please post a clear explanation how to implement a Б─°continue shoppingБ─² button/link on the cart page that will take the customer back to the category they were shopping in? Please include the file name(s) that need to be edited. Thank you!
__________________
Dawn X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#68
|
|||||||
|
|||||||
Wow, I never thought I'd see this thread again.
I'll update the continue shopping thing that doesn't require javascript (I hope).
__________________
X-Cart Pro 4.0.5 Fedora Core 2 Apache 2.x/PHP 4.x MySQL 3.x |
|||||||
#69
|
|||||||
|
|||||||
Re: Continue Shopping
I have a solution that▓s based on the JavaScript history function (javascript: history.go(-1)) that some of the other solutions in this thread used. This will always take you back to the previous page which, logically, should always be the page you just clicked the ⌠add to cart■ button. So, if you clicked on the ⌠add to cart■ button from the home page, then selecting the ⌠continue shopping■ button will take you back to the home page. If you clicked on the ⌠add to cart■ button from a category page it will take you back to that category page. etc. The ⌠continue shopping■ button will only appear when a product was just added to the cart. So for instance, if you click on the ⌠View Cart■ link in the minicart from the home page, then the ⌠continue shopping■ button won▓t appear.
Step1: Edit: /cart.php In the code: Code:
Code:
Step 2: Edit: /skin1/customer/main/cart.tpl Change: Code:
To: Code:
Step 3: Create a file: skin1/buttons/continue_shopping.tpl Code:
__________________
X-Cart Gold 4.2.2 - 3.1.19 |
|||||||
#70
|
|||||||
|
|||||||
Re: Continue Shopping
I can't seem to get the config.php addition to work on 4.13. I can't get any pages to load after I make that change. I'm using xgard's code from earlier in this thread. Does anybody have any suggestions?
__________________
X-Cart Version: 4.15 (in development) |
|||||||
|
|||
X-Cart forums © 2001-2020
|