Closed (fixed)
Project:
Ubercart AJAX Cart
Version:
6.x-2.0-beta11
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2011 at 14:40 UTC
Updated:
20 Aug 2011 at 21:31 UTC
Works excellent on products page but on an individual product page, the add to cart button doesn't produce the pop up message but instead reloads page with product added to shopping cart. Bug?
Comments
Comment #1
erik seifert commentedSounds like a js error. Please check for error messages and post them to this thread. You can also add a url to test.
Thanx
Comment #2
Luki_be commentedI don't get any js error messages (unless i'm looking in the wong place) but here's a test url:
http://www.dzinelabs.com/projects/drupal/content/discount-testing
TIA
Comment #3
tunicI think your problem is theme related. UC Ajax Cart tries to find Ubercart Add to cart button based on ajax-cart-submit-form class (it's added with a form alter at uc_ajax_cart_alter_cart_form function).
In your theme, Add to cart buttons from individual product pages do not have this class. Testing module with standard module works ok with individual product page.
Try to test module in your site with Garland theme, and if it works (it should ;) please check your theme and custom modules that may be altering the Uc Ajax Cart needed markup.
Lowering priority and changing to feature request as long as it doesn't seem to be a bug.
Comment #4
Luki_be commentedk, tnx tunic. I'll check with the peeps of the theme to see if and whee i can change the theme to add the needed class.
Comment #5
tunicWell, in fact module locates Add to Cart button with this selector:
Check Garland markup to see how should be, or check mentioned function (uc_ajax_cart_alter_cart_form).
Comment #6
tunicChanging to right category.
Comment #7
Luki_be commentedHi tunic,
i'm afraid i can't locate neither the selector or the function ... i mean i see it in the Garland source but i have no clue where i can add it in my theme ...
Comment #8
tunicYour support request is about tehming, I'm afraid but that's out of my scope, you should check some theming tutorials.
My thought is that you have overriden add to cart markup in someway, so you should review your theming code for page products and insert or reuse Ubercart original code.
Comment #9
Luki_be commentedFound the culprit ... i was using this code for the template.php to show stock: http://chalcedony.co.nz/gemsofwisdom/ubercart-2-display-stock-available
turns out that code messed your module up:
function acquia_prosper_uc_product_add_to_cart( $node )This function alters the add to cart button on product pages. All is well now.