I don't want to redirect to cart every time "Add To Cart" is clicked.
I have the cart installed in header ( "Cart: 2 items | Checkout" ), and it shows (with animation) that product has been added.
I've found a recommendation to replace $this->redirect(HTTPS_SERVER . 'index.php?route=checkout/cart'); with $this->redirect(html_entity_decode($_SERVER['HTTP_REFERER'])); in catalog/controller/checkout/cart.php - but it made no difference.
Cart is DISABLED in admin, AJAX is ENABLED (required for the animation).
Any ideas on how I can force the product page to stay on product page when "Add To Cart" is clicked?
I have the cart installed in header ( "Cart: 2 items | Checkout" ), and it shows (with animation) that product has been added.
I've found a recommendation to replace $this->redirect(HTTPS_SERVER . 'index.php?route=checkout/cart'); with $this->redirect(html_entity_decode($_SERVER['HTTP_REFERER'])); in catalog/controller/checkout/cart.php - but it made no difference.
Cart is DISABLED in admin, AJAX is ENABLED (required for the animation).
Any ideas on how I can force the product page to stay on product page when "Add To Cart" is clicked?
just put // in front of to comment out
You have 2(TWO) lines of for the POST/GET methods
you have to comment them both
just add // for the 2 lines and that's it
this is for cart.php
Do the following mod if the above mode doesn't solve the problem
then go in product.php and comment with // the following line:
cheers!
Code: Select all
$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/cart');
You have 2(TWO) lines of
Code: Select all
$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/cart');
you have to comment them both
just add // for the 2 lines and that's it
this is for cart.php
Do the following mod if the above mode doesn't solve the problem
then go in product.php and comment with // the following line:
Code: Select all
$this->data['action'] = HTTP_SERVER . 'index.php?route=checkout/cart';
...some things are never ment to be...
try to add code bellow on product.tpl
Code: Select all
$('#add_to_cart').removeAttr('onclick');
Like so:
Or do you have a line number?
I did the above but now it does neither function.
Code: Select all
<a onclick="$('#add_to_cart').removeAttr('onclick');" id="add_to_cart"><span><img src="/image/add.png"/></span></a>
I did the above but now it does neither function.
This just assumption since I don't know code you use.
1. First Solution
Add
after
2. Second Solution
Remove manually "on click" from the add to cart.
If you have a link to your site it will help.
1. First Solution
Add
Code: Select all
$('#add_to_cart').removeAttr('onclick');
Code: Select all
$.tabs('.tabs a');
Remove manually "on click" from the add to cart.
Code: Select all
<a id="add_to_cart"><span><img src="/image/add.png"/></span></a>
The 1st solution rendered the 'add to cart' link inactive.
2nd, I already tried manually removing the code
but that also renders inactive.
Thanks for your help
londontshirt dot com
2nd, I already tried manually removing the code
Code: Select all
onclick="$('#product').submit();"
Thanks for your help
londontshirt dot com
upgrade to 1.4.9.5 than we will advice further (what i've posted above applies for 1.4.9.5 since you didn't specify in your 1st post wich version you are using, I've assumed the latest)
...some things are never ment to be...
I think you are mistaking me for Tjonnyc, I did mention the version:
Having to upgrade is a pain, I am using the Accordion categories menu v1.1, it is not compatible for 1.4.9.5?Running v1.4.9.1
yes it IS:
"accordion_categories_menu_v1.1 v1.4.8, v1.4.8b, v1.4.9, v1.4.9.1, v1.4.9.2, v1.4.9.3, v1.4.9.4"
If you paied for it you should receive free updates.
and yes i've mistaking you.
anyway If you want help make your own topic, this is the best solution.
"accordion_categories_menu_v1.1 v1.4.8, v1.4.8b, v1.4.9, v1.4.9.1, v1.4.9.2, v1.4.9.3, v1.4.9.4"
If you paied for it you should receive free updates.
and yes i've mistaking you.
anyway If you want help make your own topic, this is the best solution.
Last edited by ciprianrpp on Fri May 27, 2011 6:36 pm, edited 1 time in total.
...some things are never ment to be...
and the 1.4.9.4 should work for 1.4.9.5 ALSO!
please look at release CHANGE LOG!
http://www.opencart.com/index.php?route ... d/download
please look at release CHANGE LOG!
http://www.opencart.com/index.php?route ... d/download
...some things are never ment to be...
backup your website.
backup your database from phpmyadmin> EXPORT
upgrade and see what happens. if it's not OK after upgrade than import your backuped database, import your backup files, delete cache and that;s it.
backup your database from phpmyadmin> EXPORT
upgrade and see what happens. if it's not OK after upgrade than import your backuped database, import your backup files, delete cache and that;s it.
...some things are never ment to be...
The upgrade went OK and did not produce any errors. But I have lost my design modifications?
Do you mean I should upload the backup files, what purpose does this have?
Cheers
Code: Select all
import your backup files, delete cache and that;s it.
Cheers
Great, I re-done the upgrade following the Opencart Faq & Tutorials, thanks! it seems to have gone without error
I am still not able to stop the page redirecting to the cart page though? I followed all the suggestions.
londontshirt dot com
Thanks
I am still not able to stop the page redirecting to the cart page though? I followed all the suggestions.
londontshirt dot com
Thanks
In Admin/Extensions/Modules/Cart I enabled the Ajax add to cart. Now items get added to the cart without re-directing.
Good but I do not want the animation. Got stuck again.
I decided to look at catalog/view/javascript/jquery/jquery-1.3.2.min.js and see if I could stop the animation by changing something in the code.
I did this by changing display 'visible' in two places to display 'none' .
So now I have it working how I wanted, but I am sure there must be a better way of doing it
Any suggestions please
Good but I do not want the animation. Got stuck again.
I decided to look at catalog/view/javascript/jquery/jquery-1.3.2.min.js and see if I could stop the animation by changing something in the code.
I did this by changing display 'visible' in two places to display 'none' .
So now I have it working how I wanted, but I am sure there must be a better way of doing it
Any suggestions please
Who is online
Users browsing this forum: No registered users and 76 guests