Post by asfand.cb » Sat Feb 17, 2018 2:10 am

Please help me
when user click add to cart then he go to the product page means main image page i show in also image so user click add to cart then direct to cart like this theme http://myclubcrm.com.au/canterburycouga ... rt-sl.html click add to cart then direct to cart my version is Version 2.1.0.2
i am waiting your quick response please..
my email is asfand.cb@gmail.com
skype malikg537

Newbie

Posts

Joined
Fri Nov 04, 2016 8:59 am

Post by IP_CAM » Sat Feb 17, 2018 2:12 pm

Well, if you expect a quick response, then better publish your Matters
in the commercial Forum Sections and pay for top Support. Otherwise,
better don't make statements like URGENT, or QUICK, because nobody
is required around here to assist others as quick as possible.
---
And your 'Problem' only exists, if a Product has Options activated, wich
need to be selected on a Product Page, otherways, it you press the
ADD TO CART Button, it will change to the Cart, if the Product chosen
has no selectable Options.
Ernie

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by asfand.cb » Sat Feb 17, 2018 2:21 pm

IP_CAM wrote:
Sat Feb 17, 2018 2:12 pm
Well, if you expect a quick response, then better publish your Matters
in the commercial Forum Sections and pay for top Support. Otherwise,
better don't make statements like URGENT, or QUICK, because nobody
is required around here to assist others as quick as possible.
---
And your 'Problem' only exists, if a Product has Options activated, wich
need to be selected on a Product Page, otherways, it you press the
ADD TO CART Button, it will change to the Cart, if the Product chosen
has no selectable Options.
Ernie
Hello Friend sorry for this
2nd i show in image i dont want this ajax line "Success: You have added Player Kit W/ Short Length Shorts (Girls) to your shopping cart!"
user click in add to cart then direct to the cart page thanks IP_CAM you are awesome but sorry for my words

Attachments

41.JPG

41.JPG (86.52 KiB) Viewed 1985 times


Newbie

Posts

Joined
Fri Nov 04, 2016 8:59 am

Post by asfand.cb » Mon Feb 19, 2018 7:08 am

here is product.tpl code
<script type="text/javascript"><!--
$('#button-cart').on('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'),
dataType: 'json',
beforeSend: function() {
$('#button-cart').button('loading');
},
complete: function() {
$('#button-cart').button('reset');
},
success: function(json) {
$('.alert, .text-danger').remove();
$('.form-group').removeClass('has-error');

if (json['error']) {
if (json['error']['option']) {
for (i in json['error']['option']) {
var element = $('#input-option' + i.replace('_', '-'));

if (element.parent().hasClass('input-group')) {
element.parent().after('<div class="text-danger">' + json['error']['option'] + '</div>');
} else {
element.after('<div class="text-danger">' + json['error']['option'] + '</div>');
}
}
}

if (json['error']['recurring']) {
$('select[name=\'recurring_id\']').after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
}

// Highlight any found errors
$('.text-danger').parent().addClass('has-error');
}

if (json['success']) {
$('#notification').html('<div class="alert alert-success">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');


$('#cart-total').html(json['total']);

$('html, body').animate({ scrollTop: 0 }, 'slow');

$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
});
//--></script>




2nd here is common.js how can change link direct to cart i am not use notification first user direct cart page please help anyboday

Code: Select all

Like this site 
http://myclubcrm.com.au/canterburycougars/index.php/player-uniform/cc-training-shirts.html
// 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">&times;</button></div>');

$('#cart-total').html(json['total']);

$('html, body').animate({ scrollTop: 0 }, 'slow');

$('#cart > ul').load('index.php?route=common/cart/info ul li');
}
}
});
},

Newbie

Posts

Joined
Fri Nov 04, 2016 8:59 am
Who is online

Users browsing this forum: No registered users and 67 guests