Closed (won't fix)
Project:
Ubercart AJAX Cart
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2011 at 06:59 UTC
Updated:
8 Mar 2016 at 16:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tunicSorry, there are no plans yet to port UC Ajax Cart to Drupal 7, although it may be possible. Help is welcome!
Comment #2
tunicComment #3
brandonratz commentedSubscribing...
Comment #4
JohnDoranNY commentedSubscribing. Am unable to get a stable solution with Drupal Commerce, so have had to restart the entire process from scratch and going the Ubercart route... It will be quite a while before Drupal Commerce is ready form what it seems right now. Whatever I can do to help porting to D7 let me know.
Comment #5
bmx269 commentedsub
Comment #6
sslam commentedsub
Comment #7
tunicI think a new mantainer is needed to do the work. I'm not able to do it, and I think Erik can't too.
Comment #8
erik seifert commentedCorrect ;-(. If we had a D7 Project with commerce it would be no problem.
Comment #9
igor_shurubura commentedsub
Comment #10
Quarantine commentedSubscribed.
Comment #11
Macronomicus commentedI ran the latest uc_ajax_cart 6.x-2.x-dev through the new coder review & upgrade modules, I did many of the suggested changes etc but Im stuck on replacing uc_price in uc_ajax_cart.theme.inc apparently its been depreciated in Ubercart 3.x but I cant find any documentation or helpful notes related to that change.
Error: Line 87: The function uc_price() was removed.When running coder-review on normal only that error above shows, however running on minor-warnings brings up a few more errors related to the js and others that need attention.
Attached is the 7.x version, it doesn't really work of course, but its a start.
Id like to work on it more now but my plate is way too full at the moment.
Comment #12
Macronomicus commentedComment #13
ilia510 commentedhola,
I am also looking into this. In general, as far as I know uc_price was removed completely and it wont be in Ubercart 3.0, here is also some discussion:
http://drupal.org/node/991638
Then, I installed your attached module and already fixed some issues like:
uc_ajax_cart.module, line 277, changed from:
'cache' =>BLOCK_NO_CACHE,to
'cache' => DRUPAL_NO_CACHE,Also changed line 14 and 15, includes of modules, now they are:
It helped, but now I am stuck with some other notice:
Notice: Undefined index: #attributes in uc_ajax_cart_alter_cart_form() (line 425 of /home/mysite/public_html/sites/all/modules/uc_ajax_cart/uc_ajax_cart.module).
Also I think in Drupal 7 handling of JavaScript and jQuery is different, so I will check it out thoroughly tomorrow. Adding product to Ajax cart did not worked.
Also I have seen that there is upcoming Ubercart release of 3.0 stable version soon, so maybe I will need to recheck the module again.
P.S. I am not a PHP/Ajax guru, but I need ajax cart in my project so I will try to make it work.
Comment #14
Macronomicus commentedSweet... thanks ilia510 for kicking it along a bit further.
I was thinking the other day about something I read about ubercart 3.x for d-7 changing up how it does ajax to use more native drupal ahah or something along those lines. Then I wondered since the existing maintainers possibly dont wish to maintain a 7.x uc-ajax branch, what if we propose that it become a core-optional module instead? If this can be done easier with drupal 7 then maybe its a light enough component to be ubercart core-optional... I dunno... just a thought.
I dont have much time or the expertise to really fix it but I will definitely test & help where I can. Im guessing with that error you mentioned attributes must be handled differently in 3.x . Are you using the Coder Review modules? It has a review option for ubercart 2.x to 3.x ...another option is to ask on IRC #drupal_ubercart is a good spot for asking questions & #drupal-support too
Comment #15
Macronomicus commentedI created an issue over at the main ubercart cue to see if maybe they were interested in this feature being core-optional. Who knows,it may be that its still too complex - but im still wondering if d7 and ubercart 3.x makes this sort of feature simpler.
http://drupal.org/node/1296518
@ilia510 Did you have any more luck with your testing?
Comment #16
Jason Ruyle commentedsubscribing
Comment #17
Michael-IDA commentedsubscribing
Comment #18
erik seifert commentedPlease use the follow button on top of the page.
Thanks ;- )
Comment #19
Macronomicus commentedThey added the one feature from this module ... anonymous cart is now standard in Ubercart 7x They may do the ajax bits too if it makes sense and/or someone puts up a patch to kick around.
Comment #20
landylan commentedI also used Coder module to modify code first, then I tried to trace the code for Drupal7. Here's my code....
I think it's workable now, but the "remove product" links in cart block are still not ajaxified... I've tried many method to solve that, but I still did not find the solution.
The situation is that, the inline "onclick" of those "remove product" links will call a function "ajaxCartBlockUIRemove()" in uc_ajax_cart.js, but it won't actually go there. I also try to write some jquery code to catch the click on those links, but it still did not work.
Is there anyone who may help? ^_^
Comment #21
landylan commentedI found the problem...
1. I give up to use
And I modified all the "$(...)" to "jQuery(...)".
2. parameter:context of some function in uc_ajax_cart.js was missing. I put them back.
3. Some global variable was reclaimed. I've removed them...
And finally it works. The "Remove product" links are ajaxfied!!
reason #1 is the major reason which makes the function call in inline "onclick" doesn't work. #2 & #3 are just trying to recover the Drupal7 code back to the original Drupal6 code.
Here's the code...
Comment #22
rustyblue100 commentedThank you very much, it works!!
Comment #23
Macronomicus commentedWow ... thanks landylan!
Comment #24
barmentalisk commentedthanks a lot!!!
had downloaded last 2 attachments and have got standart ajaxed cart!
it works.
Comment #25
tunicOk guys, good work :)
I'll try to create a release for Drupal 7. But as it's stated at the module page current mantainers we don't have resources to work on this branch, maintainment must be a done by the community (or by a new brand maintainer).
Thanks to all!
Comment #26
mrfelton commentedFor those of you who may have moved to Drupal Commerce and are looking for similar functionality, there is Commerce Cart Ajax - I'm sure that any/all help making that project as good a solution as this is for Ubercart would be well received.
Comment #27
alexsco74 commentedThanks landylan for your work and sorry. I have problems with work this module and pathauto module. Page admin/config/search/path/patterns is blank and empty, solved problems my change code for your module ...
Comment #28
azzis commentedHi all. Thanks for the module! Great work!
In uc_ajax_cart.module line 318:
right is:
Comment #29
azzis commentedalexsco74, page admin/config/search/path/patterns looks good, but:
Comment #30
Punk_UnDeaDyep
drupal_add_library("system","jquery.form");nope
drupal_add_js('misc/jquery.form.js');because with jQuery update it do not work correctly
nope
becouse it add automatically from core
Comment #31
areikiera commentedThank you for that azzis (comment #28)! That properly formats the total of all products, but the product specific total is still unformatted.
My block looks like this:
SHOPPING CART
Products
2x Product A 5300
Remove Product
2 items | Total: $5,300.00
What change would I make to format the product specific cost/total?
Thanks!
Comment #32
areikiera commentedFigured it out!
In uc_ajax_cart.module, need to change line 299 from:
to:
Thanks so much for the module and the folks helping to port it to D7. Wonderful module!
Comment #33
Allthegearnoidea commentedThis is really nice, thanks for all the work guys.
Comment #34
Allthegearnoidea commentedI'm not sure if I should post here or in the UC Out of stock notification thread, but it would be really good to get the 2 items Ajax Cart and Out of Stock notifications working together.
I have both installed now and there is a little bit of an issue with them working together.
Basically if an item is out of stock already out_of_stock_notifcation prevents the item from being added to the cart.. Which is great that continues to work with Ajax cart installed.
However if there say 5 items in stock and you want to add 6 Ajax cart lets you add 6 and the Out of stock notifcation does not kick in to say there are only 5 in stock, thus allowing people to add to their cart way more items than are actually in stock.
If I look in the logs when adding more items than in stock the following message is created:
Type
php
Date
Thursday, May 17, 2012 - 09:21
User
xxxxxxxx
Location
http://www.xxxxxxx.com/uc_ajax_cart/add/item
Referrer
http://www.xxxxxxx/product/xxxxxxxxxx
Message
Warning: in_array() [function.in-array]: Wrong datatype for second argument in uc_out_of_stock_validate_form_addtocart() (line 291 of /xxxx/xxxxx/xxxxxxx/modules/uc_out_of_stock/uc_out_of_stock.module).
Severity
warning
Hostname
xxxxxxxxx
As I say I don't know if this is an Out of stock notifcation issue or an Ajax cart issue I'll post a link to this in the out of stock notifcation too.
Any thoughts on how to overcome this as this functionality combined with Out of stock would make the cart even better.
Happy to post more info on request (I'm just not sure what people need right now).
Thanks
Comment #35
himagarwal commentedI just tested "uc out of stock" with "uc ajax cart" in Ubercart 3.x (Drupal 7.x) and it has only one bug (so far which I have found) as already mentioned by user: "Allthegearnoidea" i.e. it is allowing you to add more than stock quantity to the cart but it does not go through to checkout with more than stock quantity.
Comment #36
hanoiiFor those complaining on "uc out of stock" not working, it's not a specific issue of that module, I suggest you to try: #1213574: Ajax Cart not working with uc_out_of_stock notification and comment there, that should sort things with uc_out_of_stock on D7.
Comment #37
tunicLet's change this issue's status until a stable release is published.
Comment #38
Archie22is commentedSubscribe...
Comment #39
hockey2112 commentedHas there been any movement on this initiative to port Ajax Cart to UC3? I'd be willing to consider funding part of the expense if necessary.
Are there any alternatives that will provide similar functionality (i.e. adding to cart without leaving the current page)?
Comment #40
tunic#39 Please try 7.x-2.x-dev. As is stated in module's page devs we don't have time to fully port UC Ajax Cart to Drupal 7 although we can add contributed patches.
Comment #41
mienjob commentedTerrific Module.
By the way, one thing that still annoys me.
I have one "add to cart button" and shopping cart block, placed in the same page.
the problem is,the number of buyed items in the shopping cart block is not automatically updated when i clicked the ajaxified "add to cart button" . it is updated only when I clicked "View cart" link which open the usual cart's content (the one before checking out).
do you know how to make number of buyed items in shopping cart block is automatically updated without clicking "view cart" link ?
Comment #42
BigMike commentedsubscribing
Comment #43
erik seifert commentedI try to make a new start with commerce ajax cart. Feel free to test this module.
https://drupal.org/project/commerce_ajax_cart
Works with commerce kickstart out of the box. Would be nice to get some feedback.
Thanks,
Erik
Comment #44
BigMike commentedThat is for Drupal Commerce, not Ubercart.
(Having said this however, what are we Drupal 6.x users to do when many UC modules we depend on [1] have not been ported to D7 and [2] we are going to have to upgrade to D7 someday. I don't know what happened internally with Ryan leaving the Ubercart team and starting his own competing module but I'm not ready to throw in the towel and give up on UC so easily as we've been a happy UC user for more than 4 years now...)
Comment #45
bradnovation commentedsub
Comment #46
sk2013 commented+Sub
Comment #47
m_aftab commentedI would like to ask same ques which mienjob ask
"I have one "add to cart button" and shopping cart block, placed in the same page.
the problem is,the number of buyed items in the shopping cart block is not automatically updated when i clicked the ajaxified "add to cart button" . it is updated only when I clicked "View cart" link which open the usual cart's content (the one before checking out).
do you know how to make number of buyed items in shopping cart block is automatically updated without clicking "view cart" link ?"
Do anyone have solution ?
Comment #48
atiba commentedSubscribing, although I think Ubercart is a lost case and it's time to switch to Drupal Commerce. All these Ubercart modules hardly get maintained now a days.
Comment #49
Staler75 commentedsub,
hope there will be someone to pic this up and make a stable version :)
Comment #50
BigMike commentedx2 @49. With more than 5 years invested, we really don't want to migrate away from Ubercart :( Plus Ubercart has a special place in my heart for all we've been through together ;)
Comment #51
hanoiiI am also struggling to part ways with Ubercart into commerce. But I sticked with Ubercart for an ecommerce project of my own and I consider some AJAX cart is a UX must. Contributing to this module would have been a pain so I took the project from scratch. It's not an out of the box replacement, it's a different approach with different philosophy but I am very happy with what I did.
If you want to try it out you can do so at https://drupal.org/sandbox/hanoii/2247395.
I will soon release it as a proper module, but so far I am keeping it in my sandbox, you need to check it out with git. There's no download links on sandbox projects.You can, however, open issues if you find something that doesn't work. Bear in mind that I want to keep the module as simple to maintain as possible, so new features, unless they can be added within a simple approach, should be attempted on third party modules. Entry points for alterers and theme changes are in this module.
EDIT: I released it today as a regular module: https://drupal.org/project/uc_ajax_cart_alt
Comment #52
atiba commentedThanks a lot hanoii! I will try out your module in one of my own fun projects really soon. If I find any problems I will let you know.
Comment #53
Staler75 commentedThanks hanoii i will try it on one of my new projects or test it with a test/dummy site :)
Comment #54
hanoiiComment #55
hanoiiComment #56
thoughtcat commentedThe cart only displays the prices and totals to one decimal place instead of two - see screenshot at https://www.drupal.org/files/issues/decimal%20points%20in%20cart.jpg
Comment #57
tunicThis module is not going to be ported to Drupal 7, please check the proposed alternative:
http://drupal.org/project/uc_ajax_cart_alt
Comment #58
thoughtcat commentedOK thanks Tunic, I'll look into that module.
Comment #59
Keith Ritchie commentedthanks for the contributions, my cart now works fine now Ive updated the code to show the currency properly. i was going to attempt it myself and i,m so glad i didn't as i,m a novice.