Opencart Add to Cart button now working custom module - repost
$10-30 USD
Cancelado
Publicado hace más de 10 años
$10-30 USD
Pagado a la entrega
About a month ago I paid a freelancer to complete a project for me that will allow me to offer None-subscription products and subscription products on my site for sale at the same time. The freelancer did a good job and created a module that allowed us to process both none-sub and Sub order.
The problem is I did not notice there was a bugs in the module that needs to be fixed.
BUG 1
When i add a None Sub product to my cart and press continue shopping button and visit the PRODUCT page of a Subscription product the Add to Card button will not work. This bug is only available when you are trying on the Product details page and trying the add to cart button. The add to cart button works fine on the index page and the categories but not in the product details page.
How to see the problem.
a. visit this link and add the product to cart [login to view URL]
b. Press continue shopping button
c..visit sub product link and try add to cart ...it will not work [login to view URL]
The bug is also available if you add sub to cart first and then none sub
Other coder tried to fix the issue by adding the code below in the catalog/view/theme/default/template/product/[login to view URL] file, but it caused the required product options not to work and it the solution send clients directly to cart.
$.ajax({
url: '[login to view URL]',
type: 'post',
data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
dataType: 'json',
success: function(json) {
$('.success, .warning, .attention, information, .error').remove();
if (json['error']) {
if (json['error']['warning']) {
$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/[login to view URL]" alt="" class="close" /></div>');
$('.warning').fadeIn('slow');
}
//fix
else
[login to view URL] = '[login to view URL]';
//end fix
/*for (i in json['error']) {
$('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>');
}*/
}
if (json['success']) {
[login to view URL] = '[login to view URL]';
}
}
});
Original code
$.ajax({
url: '[login to view URL]',
type: 'post',
data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
dataType: 'json',
success: function(json) {
$('.success, .warning, .attention, information, .error').remove();
if (json['error']) {
if (json['error']['warning']) {
$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/[login to view URL]" alt="" class="close" /></div>');
$('.warning').fadeIn('slow');
}
for (i in json['error']) {
$('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>');
}
}
if (json['success']) {
[login to view URL] = '[login to view URL]';
}
}
});
TEST SERVER READY FOR WORKING
Hi skyviewf2a,
We have 50+ skilled web development team. Please give few minutes for technical discussion of the project.
Waiting for your reply & chance for further discussion.