My project does not use variations, so cannot say about that.
But the add to cart update animation is showing the same characteristics. It gets stuck, and during that the number of times you click the button, that quantity is updated in cart.
I am doing search on it to find a solution.
Found a solution to the animation issue, with help from my senior.
You need to comment out an eval function in wp-e-commerce.js file.
Here’s how to go about it:
- Open /wp-content/plugins/wp-e-commerce/wpsc-core/js folder in your WordPress.
- Open file wp-e-commerce.js
- Search for this code
jQuery.post( 'index.php?ajax=true', form_values, function(returned_data)
It should be around line no. 248.
- Comment out
eval(returned_data);
written just below it (say using // at the beginning of line)
- Check your site’s output in browser.
- If it works, save it.
Hopefully, this will save your time and efforts.
If it works, post this solution to other users/forums who have similar issues.
P.S.: Just to be sure, the eval
in question is with surrounded by this code:
jQuery.post( 'index.php?ajax=true', form_values, function(returned_data) {
//eval(returned_data);
jQuery('div.wpsc_loading_animation').css('visibility', 'hidden');
@rachel George
Checked out your site. The animation issue seems to have resolved. Maybe you could share how you managed.
Also, the + button on checkout page is not increasing the quantity.
Warm regards
Gopal
Hi there
Just adding a bump to this topic as I am having the same issue regarding product variations.
Any suggestions would be most appreciated.
@easel
Have you found a solution?
I think the problem is on the wpsc_the_product_price function, when checking if variations exist for the related product:
if ( ! empty( $wpsc_variations->first_variations )
I created a function:
function wpsc_product_variation_list()
{
$product_id = get_the_ID();
return wp_get_object_terms($product_id, ‘wpsc-variation’);
}
then added it to the wpsc_the_product_price function as:
if ( ! empty( $wpsc_variations->first_variations ) && count(wpsc_product_variation_list()) > 0 ) {
I havent tested it 100% yet
hello,
did you manage to fix this variations issue?
struggling with it on a site I’m working on.
Hello,
I followed what @gopal1035 mentioned, The issue I noticed with that is, You need to refresh the page in order to see the cart data (if you have cart displaying on the same page). Instead I would suggest you do this. This fixed my problem.
1. Open /wp-content/plugins/wp-e-commerce/wpsc-core/js folder in your WordPress.
2. Open file wp-e-commerce.js
3. Search for this code :
jQuery.post( ‘index.php?ajax=true’, form_values,function(returned_data) {
eval(returned_data);
jQuery(‘div.wpsc_loading_animation’).css(‘visibility’, ‘hidden’);
…
…
}
this is what you see,
Now change the code to this :
jQuery.post( ‘index.php?ajax=true’, form_values, function(returned_data) {
jQuery(‘div.wpsc_loading_animation’).css(‘visibility’, ‘hidden’);
eval(returned_data);
…
…
}
We are just moving the eval function after we hide the animation. This should solve the issue.
I had this same issue where prices on my WPEC price was displaying as:
from $0.00.
Turns out that the products displaying this misleading price had some variations left in the trash with 0 set for price. Even though they were in the trash the wpsc_the_product_price(); function was grabbing it as the lowest price.
Fix: Empty the trash on the items in question.
Worked for me.