When you are on a product page, and add to cart, the button shows loading... then goes back to Add to Cart, but does not add the product to the mini cart on the header.
The add to Cart works on the Category pages and the Home page, but not on the product page.
I tried removing the php.ini file as mentioned in previous topic, but this didn't work for me
Any ideas what could be causing this.... please
Code: Select all
<button type="button" onclick="cart.add(...)....
opencart-2.0.1.1\catalog\view\javascript\common.js
Code: Select all
var cart = {
'add': function(product_id, quantity) {.....
OpenCart®
PHP Developer.
更多中文教學在 OpenCart香港官方網站 !
QQ: 2039574815
// Cart add remove functions
var cart = {
'add': function(product_id, quantity) {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: 'product_id=' + product_id + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1),
dataType: 'json',
beforeSend: function() {
$('#cart > button').button('loading');
},
success: function(json) {
$('.alert, .text-danger').remove();
$('#cart > button').button('reset');
if (json['redirect']) {
location = json['redirect'];
}
if (json['success']) {
$('#content').parent().before('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>');
$('#cart-total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
}
});
},
can you find above code in product.tpl?
OpenCart®
PHP Developer.
更多中文教學在 OpenCart香港官方網站 !
QQ: 2039574815
Code: Select all
data: $('#product input[type=\'text\'], #product ...
Code: Select all
data: $('#product input[type=\'number\'], #product input[type=\'text\'], #product ...
There is nothing to do with the onclick event.
but buttons on the main page is true...
And when I do click on this button will only be displayed for a moment Loading But nothing happens Anyone
who can help me?
http://www.soghatenab.com/%D8%B3%D9%88% ... -birjand--
Thank you
ahmad.mohammadi.a@gmail.com
Is the problem fixed? I can add product to cart at the product page.ahmadm wrote:Hello I have a problem and that is the shopping cart button on the product page does not work buy other
but buttons on the main page is true...
And when I do click on this button will only be displayed for a moment Loading But nothing happens Anyone
who can help me?
http://www.soghatenab.com/%D8%B3%D9%88% ... -birjand--
Thank you
ahmad.mohammadi.a@gmail.com
http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
on product page add to cart button just blinks, doesnot add product to cart
the solution here viewtopic.php?t=211169
is also not sufficient
admin please address this issue, its very crucial, please
my path was ...........\catalog\view\themeMobile
today i changed it back to like original one ...\catalog\view\theme
Users browsing this forum: No registered users and 285 guests