Solved

After adding an item to cart, the page isn't going to the cart?

Posted on 2011-09-06
11
327 Views
Last Modified: 2012-08-13
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,
0
Comment
Question by:Amanda Watson
  • 7
  • 2
11 Comments
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
i added one item to cart, after that it got redirected to cart by itself. I am not facing this issue
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
did you then get redirected to the cart?
Which browser are you using?
0
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
which method is being called at the onclick of 'Add to Cart' button?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
Here is the form - does this help



addtocart-form.tpl.php
browse-notables.tpl.txt
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
Hello, can anyone help with this issue?
0
 
LVL 11

Author Comment

by:Amanda Watson
Comment Utility
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_PRODUCT_ADDED',false);
} else {
$msg = $VM_LANG->_('VM_CART_PRODUCT_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_PRODUCT_ADDED',false);
} else {
$msg = $VM_LANG->_('VM_CART_PRODUCT_UPDATED',false);
vmRedirect( $sess->url( '/index.php?page=shop.cart&option=com_virtuemart&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?
0
 
LVL 11

Accepted Solution

by:
Amanda Watson earned 0 total points
Comment Utility
This fixed it
// 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_PRODUCT_ADDED',false);
vmRedirect( $sess->url( '/index.php?page=shop.cart&option=com_virtuemart&Itemid=9999', true, false ) );
} else {
$msg = $VM_LANG->_('VM_CART_PRODUCT_UPDATED',false);
vmRedirect( $sess->url( '/index.php?page=shop.cart&option=com_virtuemart&Itemid=9999', true, false ) );
}

// Comment out the following line to turn off msg i.e. //$vmLogger->tip( $msg );
$vmLogger->info( $msg );
}
0
 
LVL 11

Author Closing Comment

by:Amanda Watson
Comment Utility
Found solution eleswhere
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to count occurrences of each item in an array.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now