Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By darol100 on
I have been working on a custom module for cart links on Commerce. Base on a article on CodeKarate.com (http://codekarate.com/blog/creating-drupal-commerce-add-cart-links).
I have try to follow this custom module and for some reason is not working for me. I upload on GitHub my version of the cart link module. https://github.com/darol100/Commerce-Cart-Link If someone can tell me what I did wrong, or what I'm missing I will appreciated.
***NOTE: I do not have a lot experiences on creating modules so sorry if something very simple.
Comments
Here is more information about it...
Hey I need help with the Module Development
My goal of the module is having a cart link where if someone click on that link this module will run and add the product to my cart of my commerce site. However, when i go to the link, I will assume that and item will be added to my cart and that is not happening. Theoretically I should go to this link like this www.examplesite.com/product/add/[NODEID]/[Amount Of Items]. And the cart will added and for some resason is not working. I try this out and the product doesnt add to the cart.
My goal is integrating Commerce with another site so I need to have something like Cart Links in Ubercart to be able to do this integration in Commerce.
Can someone help me how to troubleshoot this ?
- Darryl Norris
Be Connected: Website | Twitter | LinkendIn | GitHub
_
It's not very likely someone in the forums will install commerce and your module to try and help. You're best bet is to actually post the code you suspect might be the issue as well as describe in detail what you're expecting to see and what you are seeing.
Another option is posting to the commerce issue queue. But again, simply linking to a module on github isn't likely going to get a useful response.
@WorldFallz thanks for the
@WorldFallz thanks for the advice. The reason I upload it to Github is because I thought will be easier for someone to troubleshoot. Also, I wanted to make most of my project open source so I thought that but uploading in GitHub will be a good practice for myself.
What I’m trying to accomplished is having a module where I can add a product by click a url. By doing this I will be able to insert my product in an attribute () and add the product to the cart.
The module is not too long so the problem should be some here in there.
Any help will be appreciated.
- Darryl Norris
Be Connected: Website | Twitter | LinkendIn | GitHub
This functionality was
This functionality was present in Ubercart, wondering if anyone got anywhere for Drupal Commerce... seems like a reasonable set of requirements and there are a few modules for Commerce that get close to this functionality... none that I've found nail it, yet.
@darol100 ... did you ever get your use case resolved? i.e. url.com/cart/nid/qty
I think, I did solve it but I
I think, I did solve it but I do not remember. Also, I'm not longer part of that project.
- Darryl Norris
Be Connected: Website | Twitter | LinkendIn | GitHub