![]() |
thanks xgarb.. you the man!
|
Question
Whenever i add any of these methods my view cart page becomes almost blank. Any ideas? ive tried all of the methods above
|
almost blank?
|
yes
Yea the only thing that shows up is the categories on the left. the cart page gets blank.
|
Re: yes
Quote:
Why dont you post snippets of code you have modified so that we could try to help? |
thank you
i was using shan's method..
i would create a tpl file and put then go to cart.tpl and put Code:
{include file="buttons/continue_shopping.tpl"} and after i would upload and overwrite the original cart.tpl the page would get blank except a few things.. thank you again for helping me. if you have any suggestions please let me know. I think i might be editing the wrong file or putting it in the wrong place. |
Re: thank you
Quote:
Hi, First of all you dont need to create a new template, you need to simply add the code to you original cart template. If I understand you correctly you overwrote your original cart.tpl which is not what you were supposed to do. I would go back and restore your original copy of your cart.tpl then add the code to that template. Hope this makes sense? if not let me know and I will be more then happy to send you a copy of my stores cart.tpl so that you could get an idea. This great mod does work, but you have to follow the instructions as outlined. Good luck and hang in there. :D |
ok
Well i followed shan's deal and he said to create a new tpl. as far as editing my cart.tpl, i restored it. um what method did you use? and would you be able to help me do that?
thank you. btw, its just the basic blue template in which i used. |
Here is what I used which is pretty straight forward but I do understand how confusing too many instructions could be trust me.
Look on page 2 of this thread for a post by: Page 2 andreas04031 Advanced Member Joined: 16 Jun 2004 Posted: Wed Feb 16, 2005 5:32 am Post subject: Follow these instructions and it should get you going, if not let us know. We all were in the same boat one time or another, atleast I know I was. Good luck |
hey
I followed that exactly and here is what it does.
http://www.numismaticenterprises.com/catrmessed.JPG |
This appears to be problem with the home.tpl possibly not loading. So this would fall into the installation category. This mod will not cause what you are seeing unless you have moded or overwrote some other files from the cart.
I highly doubt this was displaying like this before by simply [adding] the code for this mod to the template outlined in the instructions? Here is the snippet from my cart.tpl, sorry about the notes but I do this to help me know why this code is in place; helpful during future upgrades and troubleshooting too: Starts at line 92 or so. {* L92 Skin1/customer/main/cart.tpl code below added to display continue shopping button on pages *} <TD align="right"><TABLE border="0" cellspacing="0" cellpadding="0" onclick="javascript: self.location='home.php'" style="cursor: pointer;" valign="middle"> <TR><TD>[img]/skin1/images/but1.gif[/img]</TD> <TD class="Button" valign="middle" nowrap><FONT class="Button">Continue shopping</FONT></TD> <TD>[img]/skin1/images/but2.gif[/img]</TD></TR> </TABLE> {*end of code for continue shopping button*} Hope it helps Good luck. :D [/u] |
...
the cart is NOT modded at all. this is the only modding i have done.
|
Here
Here is my cart.tpl unmodded.
Code:
{* $Id: cart.tpl,v 1.74.2.10 2005/03/24 15:03:03 max Exp $ *} |
and
here it is when its edited.
Code:
{* $Id: cart.tpl,v 1.74.2.10 2005/03/24 15:03:03 max Exp $ *} |
So when you place the original cart.tpl "un modified" does the store work and display as it should? Did it work prior to trying out this mod?
If it did simply restore it to its orginal working state, then try to add the code as outlined again. I know this mod has worked great for me in versions 4.10 up to 4.17. What version are you using? Hope this helps :D |
yep
:) yea as soon as i replace with the backup version the viewcart works just fine. And i am using the newest version out.X-Cart Gold v4.0.17
I dont know what to do. If that file looked like it was edited right then i dont know what to do next. thanks. |
Quote:
First, thank you for providing this. What file did you include that last bit of code? |
Quote:
Do you mean where do I put the final line of code? Whereever you want the button to appear. Somewhere in cart.tpl next to the checkout button I believe is one location. |
yes, thank you that is what I meant. Only problem now is, I cant find cart.tpl I find a cart.php but not .tpl
|
Quote:
It is in skin1/customer/main/cart.tpl |
Thank you again, it is much appreciated your patience and continued responses. From all initial tests, it is working great.
|
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 :) |
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. |
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. |
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. |
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 |
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! |
Wow, I never thought I'd see this thread again. 8O
I'll update the continue shopping thing that doesn't require javascript (I hope). |
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:
if($mode=="add" and $productid) { Code:
if($mode=="add" and $productid) { Step 2: Edit: /skin1/customer/main/cart.tpl Change: Code:
{include file="buttons/continue_shopping.tpl"} To: Code:
{if $smarty.get.mode eq 'added'} Step 3: Create a file: skin1/buttons/continue_shopping.tpl Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping href=$href|default:"javascript: history.go(-1);" title=$title style=$style js_to_href="Y"} |
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?
|
Re: Continue Shopping
I'm FUBARing my site every time I try to get this config.php file to accept this code. I've had comments from test users that returning to the cart/home page is frustrating, and frustrating = no sales.
I've done some searching and discovered that $HTTP_GET_VARS has been deprecated for $_GET...so I've replaced that in the following code: Code:
<?php And it still gives me the blank page of death. :( Is there some kind of compiling going on or am I placing this in the wrong section of config.php? Help, please! ps - replying to myself is sad. really sad. |
Re: Continue Shopping
using xgards code I was getting the same result when I added the code to config.php
Working on a new 4.1.5 site and found that if put the code into init.php instead all was well (at least so far). |
Re: Continue Shopping
thanks vaughan! I finally had a chance to implement your suggestion and it seems to be working on 4.15. I appreciate the help!
|
Re: Continue Shopping
Quote:
I don't understand why you wouldn't want to have the "continue shopping" button appearing in that case - as the customer would want to see it (at least, I would). I don't see why they wouldn't want to be able to continue shopping just because they got to the cart page from the home page, using the 'View cart' link in minicart. While we're on the subject of the 'continue shopping' button, has anybody else found Amazon's shopping cart to be a nightmare? Say I add one item to the cart and then click on the 'Checkout' button - the next page gives you no option other than to continue with the Checkout process, you can't add any other items to the cart without having to use the back button, there isn't even a link to the Amazon home page or any other Amazon pages on their Checkout page! (At least, this is what's been happening to me). |
Re: Continue Shopping
Quote:
Can anyone tell me where the problem lies in the code? I'd like it to redirect back to the category or the home page would be fine too. Thanks, Karen |
Re: Continue Shopping
All I can offer is the code that I have in my cart.tpl, bear in mind I have 4.1, but I don't think it should make any difference.
<td> {include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping href="javascript: history.go(-1);" style="button" js_to_href="Y"}</td> |
Re: Continue Shopping
Thanks, that worked great!
Karen |
Re: Continue Shopping
I'm using the code below, but I'm having one little problem - the cart page always takes me back to the category and never to the product detail page. I replaced $HTTP_GET_VARS with $_GET and put that part in the init.php instead of config.php. Any ideas?
Quote:
|
Re: Continue Shopping
Quote:
Hello, I tried adding the code to boh config.php and init.php and I got a blank page. finally, I added the code to /include/sessions.php and it worked ! I am using version 4.1.6 This is a great modification, thank you |
All times are GMT -8. The time now is 06:20 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.