Amanda Watson
asked on
After adding an item to cart, the page isn't going to the cart?
Hi,
Can someone help me write a redirection script for these pages here
http://www.maxtemp.com.au/index.php?option=com_virtuemart&page=shop.browse&category_id=6&Itemid=100001&vmcchk=1&Itemid=1
and
http://www.maxtemp.com.au/index.php?option=com_virtuemart&page=shop.browse&category_id=56&Itemid=1
Basically if you go to these pages (use login aaabbb/password: aaabbb) then add the item to the cart, the page doesn't go to the cart after it has been added.
It does this for all other pages that have more than one item on the page, so can someone help me write a script for this please so that on these pages is always redirects to the cart page after the item has been added to the cart?
Thanks,
Can someone help me write a redirection script for these pages here
http://www.maxtemp.com.au/index.php?option=com_virtuemart&page=shop.browse&category_id=6&Itemid=100001&vmcchk=1&Itemid=1
and
http://www.maxtemp.com.au/index.php?option=com_virtuemart&page=shop.browse&category_id=56&Itemid=1
Basically if you go to these pages (use login aaabbb/password: aaabbb) then add the item to the cart, the page doesn't go to the cart after it has been added.
It does this for all other pages that have more than one item on the page, so can someone help me write a script for this please so that on these pages is always redirects to the cart page after the item has been added to the cart?
Thanks,
i added one item to cart, after that it got redirected to cart by itself. I am not facing this issue
ASKER
ASKER
did you then get redirected to the cart?
Which browser are you using?
Which browser are you using?
which method is being called at the onclick of 'Add to Cart' button?
ASKER
ASKER
Hello, can anyone help with this issue?
ASKER
I did this
Hi Amanda,
In the ps_cart.php find the following:
// Ouput info message with cart update details /*
if($total_quantity !=0 || $total_updated !=0 || $total_deleted !=0) {
if( $total_quantity > 0 && $total_updated ==0 ) {
$msg = $VM_LANG->_('VM_CART_PRODU CT_ADDED', false);
} else {
$msg = $VM_LANG->_('VM_CART_PRODU CT_UPDATED ',false);
}
// Comment out the following line to turn off msg i.e. //$vmLogger->tip( $msg );
$vmLogger->info( $msg );
}
and replace it with following code:
// Ouput info message with cart update details /*
if($total_quantity !=0 || $total_updated !=0 || $total_deleted !=0) {
if( $total_quantity > 0 && $total_updated ==0 ) {
$msg = $VM_LANG->_('VM_CART_PRODU CT_ADDED', false);
} else {
$msg = $VM_LANG->_('VM_CART_PRODU CT_UPDATED ',false);
vmRedirect( $sess->url( '/index.php?page=shop.cart &option=co m_virtuema rt&Itemid= 9999', true, false ) );
}
// Comment out the following line to turn off msg i.e. //$vmLogger->tip( $msg );
$vmLogger->info( $msg );
}
but you need to press add to cart twice before it works?
Hi Amanda,
In the ps_cart.php find the following:
// Ouput info message with cart update details /*
if($total_quantity !=0 || $total_updated !=0 || $total_deleted !=0) {
if( $total_quantity > 0 && $total_updated ==0 ) {
$msg = $VM_LANG->_('VM_CART_PRODU
} else {
$msg = $VM_LANG->_('VM_CART_PRODU
}
// Comment out the following line to turn off msg i.e. //$vmLogger->tip( $msg );
$vmLogger->info( $msg );
}
and replace it with following code:
// Ouput info message with cart update details /*
if($total_quantity !=0 || $total_updated !=0 || $total_deleted !=0) {
if( $total_quantity > 0 && $total_updated ==0 ) {
$msg = $VM_LANG->_('VM_CART_PRODU
} else {
$msg = $VM_LANG->_('VM_CART_PRODU
vmRedirect( $sess->url( '/index.php?page=shop.cart
}
// Comment out the following line to turn off msg i.e. //$vmLogger->tip( $msg );
$vmLogger->info( $msg );
}
but you need to press add to cart twice before it works?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found solution eleswhere