last day (14 days later) » 

9:44 AM
0
Q: Magento - Shopping cart delete item is not working

RobertDI have update my store at last version 1.9.2.4 and I have ssl enable, after this my delete button from the shopping cart has stop working. I see in firebug this error: ReferenceError: coShippingMethodForm is not defined coShippingMethodForm.submit = function () { at line 655 At that line I hav...

 
can you please provide file path and name?
 
Hi, file path is: example.com/checkout/cart/delete/id/20383/form_key/… and the name? what name do you need?
 
I need file name and its path where you get this error
 
here is the phtml where the button is: app/design/frontend/default/ma_sagitta/template/checkout/car‌​t/item/default.pht‌​ml and where the js is: example.com/js/magentothem/ajax_cart_super.js
 
which plugin are you using for ajax cart ?
 
9:44 AM
Magentothem_Ajaxcartsuper
 
ohh you have created variable like this var coShippingMethodFormAjax and you are using it like this coShippingMethodForm
 
can you show me how?
hi again
 
open your website in firefox press f12 and reload page. and check console.
 
I do is very strange
please take a look
n u t r i j a.com
add a product in cart and then try to remove it from shopping cart
you see?
 
yes open this file view-source:https://nutrija.com/js/magentothem/ajax_cart_super.js


search for function deleteCartInCheckoutPage(){

change $('ajaxcart-checkout-content').innerHTML = form_cart;

to $j('ajaxcart-checkout-content').innerHTML = form_cart;
same for other
do this change for whole file $jq
 
10:00 AM
so instead hq to add only $?
sorry jq
 
yes
no
instead of $ you need to use $jq
 
and where is double $$?
for example here
$$('.sidebar .block-cart').each(function (el){
 
also use jq
 
so this will look $jq('.sidebar .block-cart').each(function (el){
?
 
yes
change in whole file
 
10:08 AM
is done
please have a look is the same
 
10:21 AM
remove dataType: 'jsonP'
data: {}, also
 
done
the same
 
change this $jq('ajaxcart-checkout-content').insert(form_cart);

to insertAfter (remove insert)
 
$jq('ajaxcart-checkout-content'). insertAfter(form_cart); like this?
 
done
now we have this
TypeError: $jq(...).down is not a function


var cart_content = $jq('ajaxcart-checkout-content').down('.cart_content').innerH...
 
10:27 AM
$jq('ajaxcart-checkout-content').insertAfter(form_cart);
dont put space
 
done
: $jq(...).down is not a function
 
replace this var cart_content = $jq('ajaxcart-checkout-content').down('.cart_content').innerHTML;

with var cart_content = $jq('ajaxcart-checkout-content').find('.cart_content').innerHTML;
 
done
TypeError: el.replace is not a function
 
10:51 AM
replace $jq('.top-cart-contain').each(function (el){
el.replace(top_cart);
});

with

$jq('.top-cart-contain').each(function (el){
$(this).text().replace(top_cart);
});
every el.replace( to $(this).text().replace(
 
done
 
sorry $(this).text() with $jq(this).text()
 
done
hmm it work but there is something strange now, when you add a product in cart the product is not go first in the mini top shopping cart
when you add a product in cart will be redirected automatically to the shopping cart and this is not okay
 
find this $jq(this).text ().replace((data.sidebar_cart); and remove space after text
 
is not any space there
$jq(this).text().replace((data.sidebar_cart);
maybe because exist two ((
?
 
11:01 AM
yes and check line number 428
 
at 428 I have this $jq(this).text().replace((data.sidebar_compare);
388 is the correct line
take a look
SyntaxError: missing ) after argument list


$jq(this).text().replace((data.sidebar_cart);
 
yes remove extra (
search for this and remove extra $jq(this).text().replace((data.top_link)
check file first than upload please
 
I remove all extra (
now in the shopping cart we have this
TypeError: $jq(...).down is not a function


...ar full_cart_content = $jq('ajaxcart-checkout-content').down('.ajaxcart_checkout...
at line 614
 
replace down with 'find'
 
done the delete button is not work now
:(
 
11:16 AM
check code:
$jq(document).ajaxComplete(function(){
var enable_module = $jq('#enable_module').val();
if(enable_module==0 || !enable_module) return false;
//hide mini cart on popup
$jq('.ajaxcartsuper-index-productview #mini_cart_block').hide();
AddToCartOnListProduct();
deleteCartInSidebar();
removeCompareProductLink();
removeWislishProductLink();
addProductToCartFromWishlist();
addProductCompare();
addProductWishlist();
//deleteCartInCheckoutPage();

})

why this in comment //deleteCartInCheckoutPage();
 
I don't know
we must uncheck?
 
yes
let try
you code have too much js error :(
 
done
is the same
you know magento?maybe you can help me, I can't reset the customers password, when I use forgot password I have this error: Your password reset link has expired.
anyway I will mark this as complete and if you want I can open a new question here
 
step by step you need to resolve js error.
yes ok
 
please take a look now, at the very top in the right side you have Log In button
press on that button and then use that popup to reset the password
so after the email is arrive and then press on that button, we are redirected to the store and we have Your password reset link has expired.
 
11:26 AM
put this as a question with more details
 
this I do right now
 
and upvote if you are satisfied with my help
 
maybe we can take a look again after we will finish this forgot password?
 

last day (14 days later) »