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.
Hello.
Thank you for nice module - nice work. I wold like to show coupon form on cart page "/cart" - is that possible and if yes - how?
Thanks in advance.
Regards
Comment | File | Size | Author |
---|---|---|---|
#102 | CouponCart_Added.png | 45.72 KB | mdupree |
#98 | coupon.png | 35.44 KB | mdupree |
#97 | Shopping_cart___Drupal_standard.png | 40.95 KB | mglaman |
#92 | interdiff-1684892-77-92.txt | 3.33 KB | Sebastien M. |
#92 | commerce_coupon-coupon_form_on_cart_2.x-1684892-92.patch | 12.22 KB | Sebastien M. |
|
Comments
Comment #1
pcambraUseful indeed.
I think that the solution would be to provide an views handler for the area form of the cart view.
Comment #2
firfin CreditAttribution: firfin commentedI did something similar using a webform in a block (advanced option for webform since 3.x I think). Capturing the submission with webform_rules. And using rules (with php unfortunately) to process the input. A lot of work, way beyond the scope of this module.
So a views handler seems like the better option :-)
Would be nice to have, postponed?
Comment #3
pcambraThis is something that we can reuse for the 2.x branch so, it will be a good thing to have.
Comment #4
doliveros CreditAttribution: doliveros commentedI tried going with a views area handler, but I failed at rendering the add coupon form without interfering with the cart's checkout / update cart form (The form_id's were getting mixed up, disabling the checkout or update buttons).
I finally did it with a simple form alter. I've attached the complete code, in case anyone wants to recreate it, or in case someone more experienced in custom views handlers with inputs wants to use it. I didn't change the hook's names, so don't forget to change "maze_shop" to "[my_module_name]".
Comment #5
asadblinks CreditAttribution: asadblinks commentedI have the similar situation, where I need to show coupon form on cart page. Let me see and use your code.
Comment #6
distinctgrey CreditAttribution: distinctgrey commentedCode in comment #4 is working as is for me.
Thanks a lot, good job!
Comment #7
pcambraI'm up to add something like this, can someone provide a proper patch for this?
Comment #8
acidpotato CreditAttribution: acidpotato commentedYes a patch for this would be just lovely
Comment #9
TravisJohnston CreditAttribution: TravisJohnston commentedI get a Cart error after removing the coupon.
Also, it says it successfully added the coupon, but the price doesn't change. I am using the coupon module along with the fixed price and percentage coupon modules.
Comment #10
GeduR CreditAttribution: GeduR commentedHi! Here is a patch for this.
I've used the commerce_coupon_review_pane (checkout display) to render the loaded coupons, it's working but maybe it's better to define a new preset. What do you think?
The form item #weight is hardcoded because at the present placeholders are not working with views_handler_area, I will post an issue on views module as soon as posible but meanwhile I think this patch could be a good approach to use coupons on the cart form and always we can use form_alter to modify this property.
EDIT: views related form #weight issue http://drupal.org/node/1966962
Comment #11
pcambraGreat work! thanks a lot for this
Gave it a try, code looks mostly fine but there are a couple of things that need work.
As soon as I add the element to the cart, I get this warning:
When you override methods you need to keep the signature of the parent, plus, try to develop with PHP notices enabled.
Other review things
No need to add this, if it's a views limitation, we need to focus in fixing it in Views
Why "1"? can't you just omit it?
It might be a good idea to expose this as a form option for the area
No need to do this, check get_result_entities method in Views (example in commerce_coupon_handler_field_coupon_granted_amount)
We're missing a default one here
Let's not add a message here, we need to find an alternate solution for that
Comment #12
GeduR CreditAttribution: GeduR commentedThanks, here is a new patch.
Changes:
- Adding $value to render() method.
- Delete @NOTE comment.
- Expose weight as a form option for the area
-
check get_result_entities method in Views (example in commerce_coupon_handler_field_coupon_granted_amount)I can't find out how to do this, field_handler_area hasn't have add_additional_fields() method and get_results_entities do a entity_load too, so I have use the commerce_order_handler_area_order_total handler approach, the entity cache should do its job.
- Use de default views display
- Delete drupal_set_message
Comment #13
pcambraComment #14
pcambraYeah it seems they haven't, I've posted a patch to fix it: #1321018: move add_additional_fields() up to base Views handler class
Meanwhile, I'm copying the basics of the function so we avoid reloading the order at that stage as it is already there.
Also changed the coupon view at the bottom so it's an option of the handler.
$coupon_review_view = views_get_view('commerce_coupon_review_pane');
And some minor fixes to remove the strict warnings.
It's fine for -dev so I've pushed it, thanks everybody, specially GeduR for taking this to the finish line.
http://drupalcode.org/project/commerce_coupon.git/commit/f2e8f81
If there are feedbacks/followups please open those as a sepparate issue. Thanks
Comment #16
josebc CreditAttribution: josebc commentedThank you for the patch, i need to use the 2.x of the module
should we create a different issue or submit a patch here?
Comment #17
josebc CreditAttribution: josebc commentedpatch for 2.x based on previous
Comment #18
andriy1990 CreditAttribution: andriy1990 commentedHi all. I try to use patch for 2x version. The problem is that I cannot test it to work. When I apply patch what must to do, where do I can config cart view with coupons?Can you provide a simple guide for integrate it in site?
Comment #19
josebc CreditAttribution: josebc commented@andriy1990 you can add it in the cart view footer
Comment #20
caschbre CreditAttribution: caschbre commentedI'm testing out the 2.x patch in #17.
When applying a coupon in the cart form I was seeing the following error:
It appears that in the function commerce_coupon_handler_area_cart_form_submit($form, $form_state) the following needs to change...
commerce_coupon_redeem_coupon_code($code, $order);
to
commerce_coupon_redeem_coupon_code($code, $order, $error);
I also noticed that after applying a coupon code that I still see the coupon form and am unable to remove the applied coupon.
Comment #21
caschbre CreditAttribution: caschbre commentedAttached is an updated / refactored patch to work with commerce_coupon 2.x. This patch is a combination of the patch from #17 and the logic from commerce_coupon.checkout_pane.inc. Features include:
* Ability to choose what View is used for the coupon summary.
* Fixes some of the bugs with the patch in #17.
* Coupon form is AJAX based.
* Includes more error messages (taken from checkout_pane).
Comment #22
caschbre CreditAttribution: caschbre commentedFound an issue the popped up so setting this back to needs work.
Basically on the ajax refresh the order total is being refreshed with any included discounts, but the line items are not. I'm not exactly sure why. Hitting page refresh fixes it. Any insight would be appreciated.
The ajax is also not clearing the coupon code field. Hmm.
I'm also looking at making the ajax functionality happen only when the view is configured to use ajax, otherwise it will use the standard page refresh.
I'll have another patch out today.
Comment #23
caschbre CreditAttribution: caschbre commentedOk, attached is an updated patch.
* Added validate/submit handlers to allow for page refresh/submit of coupons. This seems to be working pretty good.
* Added logic to only use ajax when view is set to use ajax. Note: I also short-circuited ajax callbacks because that is still not working.
* Updated the error handling.
I'm leaving this as needs work since the ajax logic isn't working. I'm stumped.
We could just remove the ajax code and make this needs review.
Thoughts?
Comment #24
caschbre CreditAttribution: caschbre commentedFYI... commerce_coupon.module had one minor fix to it since it was applying the coupon even if there was an error. But when saving that file, my text editor removed any extra whitespace. So the .module file is showing as a big patch for that when it's only one minor IF condition.
Comment #25
caschbre CreditAttribution: caschbre commentedAttached is an updated path to fix an issue where the option to choose the view to render the coupon summary was not being saved.
Comment #26
philipz CreditAttribution: philipz commentedGreat to see this idea being worked on.
I have one question though - wouldn't it be more flexible to add this functionality as a block so that I could place such a block anywhere I want (including cart page) and allow for coupon activation even on product or front pages? Would that be even possible? I'm considering to work on such approach.
Comment #27
caschbre CreditAttribution: caschbre commented@philipz...
I think there can be a lot of refactoring to make the coupon form more reusable. Right now the form is created in two places... a checkout pane and the views footer handler. They're slightly different but the I would think that the main part of the form could be generated in a helper function. Then the form would output the same.
Once that is there, then you can easily create a block that simply renders the form from the helper. Add in any extra stuff needed for the block and we should be golden.
I'd also add in that any validation / submit logic could be reusable to avoid lots of extra code / maintenance.
Comment #28
caschbre CreditAttribution: caschbre commentedNote: Patch #25 is generating a php warning.
This is due to a missing & in the options_validate function of patch #25.
function options_validate($form, &$form_state) {
should be (i'm guessing)
function options_validate(&$form, &$form_state) {
Comment #29
philipz CreditAttribution: philipz commented@caschbre you're absolutely right there could be some improvement regarding reusability.
I've managed to do this block approach (without ajax triggers) for 1.x version of Commerce Coupon. It's simple and works for me. The block has config settings that allows me to add some info text and a redirect path after adding coupon.
Maybe it would be easier to do the same in your patch? I mean dump the ajax stuff and make it a simple block.
Comment #30
caschbre CreditAttribution: caschbre commented@philipz.... the ajax stuff in my patch isn't working and I haven't had a chance to figure out why. Right now it works through form submits.
The coupon form part could be made into a separate function that's called by the checkout pane, the cart view, and a block. But I'm not sure it could just be a block to make it show up on the cart for properly. But a block could be a wrapper to the reusable code part. At this point I don't have any time to take it further than it is.
Comment #31
caschbre CreditAttribution: caschbre commentedHere is an update to patch #25 that includes the fix mentioned in #28. It's a whole one character difference. :)
Comment #32
jazzdrive3 CreditAttribution: jazzdrive3 commented@caschbre
I couldn't apply the patch to the latest dev until I deleted a blank line at the top of the commerce_coupon.module file. Other than that, it works fine with normal submission handling (no ajax)
Comment #33
caschbre CreditAttribution: caschbre commented@jazzdrive3 Thanks!
And if you have any ideas on the ajax stuff, I'm at a roadblock with it. Not sure where it's failing.
Comment #34
caschbre CreditAttribution: caschbre commentedHere's a reroll of #31 that ignores whitespace so it should apply cleanly.
Comment #35
dpolant CreditAttribution: dpolant commentedChanging this to a feature request.
Comment #36
capellicThanks to @doliveros for the code in #4. I'm guessing this is the code needed for 1.x because I had some issues when trying to get it to work with 2.x. I made the necessary updates -- not many -- but some things had changed. Attached.
Also, the user will have to use the Apply button for the coupon, the "update cart" and "checkout" buttons will not apply the code.
Comment #37
capellicSorry, my file in comment #36 has a bug in it that causes the coupon to be applied twice. Here's a better one.
Comment #38
skyredwangChange the status, so we can test #34 patch.
Comment #39
edxxu CreditAttribution: edxxu commentedThe #34 patch causes a warning: Strict warning: Declaration of commerce_coupon_handler_area_cart_form::render() should be compatible with views_handler_area::render($empty = false) in _registry_check_code() (line 3146 of /var/www/newdisk/lelo/public_html/includes/bootstrap.inc) with PHP 5.4.
Comment #40
edxxu CreditAttribution: edxxu at INsReady commentedHere is the new patch based on #34, which just fixes a Strict warning under php 5.4.
Comment #41
skyredwangI tested the patch, it works. The ajax part isn't completed yet, but this could be a new feature in the near future.
Comment #42
caschbre CreditAttribution: caschbre commentedLooks good edxxu! We should probably make a separate issue to handle the ajax part. I was never able to get that working.
Comment #43
Simon Georges CreditAttribution: Simon Georges commentedI can confirm the patch works as well. It just doesn't apply properly on current -version (the .info files[] addition refuses to apply, the rest is fine though).
Comment #44
Simon Georges CreditAttribution: Simon Georges commentedComment #45
dariogcode CreditAttribution: dariogcode commentedPatch #40 works for me, thanks!
Comment #46
Simon Georges CreditAttribution: Simon Georges commentedActually, it's totally fine when used with drush make.
Comment #47
Marko B CreditAttribution: Marko B commentedI think part of this patch is not right
I keep getting this message when coupon is applied
EntityMetadataWrapperException: Unable to get the data property commerce_unit_price as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /Applications/MAMP/htdocs/pht/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
Maybe something like this needs to be applied with hook_commerce_line_item_type_info()
http://drupal.stackexchange.com/questions/39303/add-product-to-the-cart-...
Comment #48
Marko B CreditAttribution: Marko B commentedMaybe it is this after all https://www.drupal.org/node/2275495#comment-9424123 so it is just connected but not really a problem of coupons.
Comment #49
joelpittetWas this meant to be left in there?
Comment #50
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedJoel, it was mentioned couple of times above that the ajax part isn't completed yet.
Anyway, attached are re-rolled patches for the latest 7.x-2.x, and additionally for 7.x-2.0-beta4, if someone needs it for project.make (like me :)).
Comment #51
Sebastien M. CreditAttribution: Sebastien M. commentedHi maciej
I've encountered an issue when trying to apply your patch (2.0-beta4) on the ".info" file.
It's breaking my "project.make" script.
I haven't tested the "2.x" release, but it seems to be good.
Many thanks
Comment #52
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedHi Sebastien!
You're right, I've created the new patch based on git clone, which doesn't have that extra "information added by ..." at the end of the file - hence the patch fails to apply.
It applies cleanly to git clone though:
Comment #53
GoZ CreditAttribution: GoZ at Centarro commentedI needed same feature but instead of duplicate code, i prefer to wrap the checkout pane form in another form. I also use a view handler for that.
Comment #54
GoZ CreditAttribution: GoZ at Centarro commentedComment #59
GoZ CreditAttribution: GoZ at Centarro commentedBased on https://www.drupal.org/node/1804592#comment-8780863, here is new patch. Only replace
$form_state['order'] = $order;
by$form_state['order'] = commerce_order_load($order->order_id);
Comment #60
GoZ CreditAttribution: GoZ at Centarro commentedForget about my patch, i have some issues due to the way data is handle in pane submit. #51 is better and works great.
Comment #61
joelpittet#50 has been working well for me for quite some time. Accidently applied #59 today in production, big whoops!
Comment #62
Frederic wbase CreditAttribution: Frederic wbase commentedI can confirm fix of #59, can we change this to tested by the community and commit it?
Comment #63
Frederic wbase CreditAttribution: Frederic wbase commentedComment #64
das-peter CreditAttribution: das-peter as a volunteer and at Cando commentedAs I understand #50 is the one that would be RTBC.
Also according to GoZ, who provided later patches, the approach of #50 seems to work better.
@Frederic wbase Could you please confirm that #50 is the one that works for you too?
Re-uploading the patch from #50 to have the "most agreed" one as the latest upload.
Also hiding all other files from the issue summary.
Again: This is not my patch - it's just a re-upload of #50
Comment #66
GoZ CreditAttribution: GoZ at Centarro commented@das-peter you miss #51 and #59. If some patches has to be hidden, that's should be everything except #59 which is based on #51 + avoid a potential issue with cache.
Comment #68
GoZ CreditAttribution: GoZ at Centarro commentedRe-launch #59 tests to be sure everything is OK since #50 submitted in #64 fails.
Comment #69
das-peter CreditAttribution: das-peter as a volunteer and at Cando commentedI gave #59 a try but as far as I can see it has a major issue since the trigger_element / buttons aren't properly detected. At least in my setup I was unable to switch to the checkout once the coupon form was visible.
So I'm back using #50 / #51 with a slightly updated patch to ensure the newly introduced error message is translatable and themed as error message.
Updated patch attached.
The patch still has major todo's give we really want to get the ajax handling working in this version. I'd suggest to postpone this.
Comment #70
joelpittetComment #71
vasikeThere is a new patch started from the previous one - #69.
- Use the parent and array_parent for handler submit/validate callbacks.
To get the right values and form elements.
It seems it doesn't work in other places, for example with "Commerce Cart Form Checkout Pane" module - Shopping cart form in checkout
- Include file in the $form_state['build_info']['files'], so the submit/validate callback could live in the handler file
- Remove ajax code, it doesn't work for now so maybe at least could have a non-ajax solution commited.
The changes could be seen in the diff file.
Comment #72
garnett2125 CreditAttribution: garnett2125 commentedContinuing on the patch #71, had an issue as submitting the coupon form was submitting the checkout form also (customer profiles form for instance). I added a limit only validating the coupon code. Need some tests.
Comment #73
das-peter CreditAttribution: das-peter at Cando commented@garnett2125 Thanks for working on this. An interdiff would've been nice however I assume this is the additon:
Btw. I propose that, if we already got rid of the ajax stuff, we also remove the
coupon_cart_form_view
option.You should be able to achieve the same using a "Global: View area" while having the freedom to place it wherever you'd like.
With the ajax handling in there I hesitated to propose this since we might needed more control over the coupons list. But as of now I think there's not really a benefit in it (besides helping people who aren't very familiar with views).
Comment #74
GoZ CreditAttribution: GoZ at Centarro commentedLine 799 in commerce_coupon_redeem_coupon_code($code, $order, &$error)
This line remove
&$error
reference from function parameters, so no error will be return after this line.I think we should not use &$error in parameters of this function since we use
&drupal_static('commerce_coupon_error_' . strtolower($code));
to retreive previous error message everywhere else.So we should use it here to.
Comment #75
michfuer CreditAttribution: michfuer at Centarro commentedFor the patch in #72 I was getting
Notice: Undefined index: coupon_code in commerce_coupon_handler_area_cart_form_submit() (line 197 of /app/drupal/sites/all/modules/commerce_coupon/includes/views/handlers/commerce_coupon_handler_area_cart_form.inc
It appears that when drupal_validate_form() calls drupal_array_get_nested_value() it's passing the #limit_validation_errors array and returns true only if all the parent keys exist. Since all those keys don't exist in $form_state['values'] at that time (I'm not sure they should), the coupon_code doesn't persist in $form_state['values'] and that's why the submit handler fails.
I updated the patch to only validate 'coupon_code' (even though saying 'only validate this thing' is confusing to me since the validation handler has already executed, so I'm guessing the purpose is to limit triggering non coupon submit handlers?).
@das-peter: I agree about removing the coupon_cart_form_view. That's included in this patch as well.
Comment #76
michfuer CreditAttribution: michfuer at Centarro commentedComment #77
michfuer CreditAttribution: michfuer at Centarro commentedRe-rolled to include tests.
Comment #78
joelpittetSeems to do the trick. It has tests and simplifies the problem. We can always iterate on this but I think this is a nice start.
Comment #79
Sebastien M. CreditAttribution: Sebastien M. commentedHi all,
There is a drawback to the #73 suggest and by the way to the #75 patch.
If you include the "order coupon view" using the "Global: View area" in the footer, there is no way to place it just after the "coupon_cart_form".
That's due to the fact that the weight specified in the footer element list is not supported for form elements :
- Order Drupal Commerce : Total
- Order Drupal Commerce : Coupon cart form
- Global: View area
That's why there is a weight specified in the setting form of coupon_cart_form footer element, but other elements which are not "form" types are not ordered in the same scope.
May be we could find an alternative by including the "order coupon view" optionally ?
Comment #80
Sebastien M. CreditAttribution: Sebastien M. commentedI agree this could be done by overriding "commerce_coupon_handler_area_cart_form", but that's not very user friendly.
From my point of view, the #69 was more interesting than the last one.
Comment #81
Sebastien M. CreditAttribution: Sebastien M. commentedIn the #77, this code seems to be dead, due to the fact the view has been removed :
Comment #82
Sebastien M. CreditAttribution: Sebastien M. commentedI suggest too to invoke the 'commerce_coupon_applied_to_cart' hook if correctly added to cart as in "commerce_coupon.checkout_pane.inc" :
Comment #83
joelpittet@Sebastien @Actualys re #79 we could look into doing something like that as a follow-up to this getting in I'm sure as an optional feature.
Re your other points did you want to provide a patch to resolve those?
Comment #84
Sebastien M. CreditAttribution: Sebastien M. commentedRevert code cleaning made at #75 and add 'rules_invoke_all' if coupon applied.
Comment #88
Sebastien M. CreditAttribution: Sebastien M. commentedMy bad. Sorry
Comment #90
Sebastien M. CreditAttribution: Sebastien M. commentedI don't understand errors reported by unit test.
Any help really appreciated.
Thanks
Comment #91
janakan CreditAttribution: janakan commentedi am getting an error:
Notice: Undefined index: coupon_code in commerce_coupon_handler_area_cart_form_submit() (Zeile 201 von */sites/all/modules/commerce_coupon/includes/views/handlers/commerce_coupon_handler_area_cart_form.inc).
Unable to redeem coupon.
any help?
thanks
Comment #92
Sebastien M. CreditAttribution: Sebastien M. commentedShould work now,
I hope
Comment #93
janakan CreditAttribution: janakan commentedstill getting the same error:
Undefined index: coupon_code in commerce_coupon_handler_area_cart_form_submit() (Zeile 203 von sites/all/modules/commerce_coupon/includes/views/handlers/commerce_coupon_handler_area_cart_form.inc).
Unable to redeem coupon.
sorry.
Comment #94
janakan CreditAttribution: janakan commentedsorry it was my fault. its working!
thank you!
Comment #95
Sebastien M. CreditAttribution: Sebastien M. commentedAre you sure you applied the last patch #92 ?
On line 203, on my side, I've got a comment and unit test correctly passed this time:
https://www.drupal.org/pift-ci-job/119886
Comment #96
Sebastien M. CreditAttribution: Sebastien M. commentedFine, thanks
Comment #97
mglamanThis works pretty well, just tried #92. It works pretty well, however the cart summary isn't reflected.
Comment #98
mdupree CreditAttribution: mdupree as a volunteer and at Acro Commerce commentedUsing Kickstart-7.x-2.31, commerce_coupon-7.x-2.x-dev, applied patch patch #92 I get the following output. Looking good to me.
Comment #99
mglamanThanks for testing, mdupree.
I'd like to actually assert prices, too, beyond just the message for better test coverage.
Keeping and "Needs Review" so we can get manual review.
Comment #100
joelpittet@mglaman in regards to #97 is that just because the cart page is not showing components? Can you change that in the view IIRC?
@mdupree that looks like the checkout page from the title on that screenshot not the cart page.
Comment #101
Andrej Galuf CreditAttribution: Andrej Galuf as a volunteer commented#92 works great when there's no ajax active on the cart page. The coupon saves, the page is reloaded and the summary shows the discount. But as soon as Ajax is activated - for instance with Commerce Cart Ajax - it'll break. I've tested that the discount applies flawlessly without ajax or without coupon, but a combination of coupon and ajax fails.
EDIT No. 3: Never mind, the non-ajax problem disappeared when I fixed a critical bug where I am an idiot. :) The ajax problem should not be in the scope of this issue.
RTBC, imo.
Comment #102
mdupree CreditAttribution: mdupree as a volunteer and at Acro Commerce commented@joelpittet Sorry my bad.
I have been able to confirm the Coupon on the Cart form. Screenshots added, looks good.
Comment #103
mdupree CreditAttribution: mdupree as a volunteer and at Acro Commerce commentedComment #106
ericjenkins CreditAttribution: ericjenkins at Exel Digital commentedI am at MidCamp in Chicago, about to manually test #92.
Comment #107
ericjenkins CreditAttribution: ericjenkins at Exel Digital commentedSuccessfully applied and tested Patch #92 by following these steps:
sites/all/modules/commerce_coupon
folder.patch -p1 < commerce_coupon-coupon_form_on_cart_2.x-1684892-92.patch
admin/commerce/discounts
admin/structure/views/view/commerce_cart_form/edit
/cart
page to testComment #109
mglamanThanks, everyone!
Comment #111
april26 CreditAttribution: april26 commentedWhen I used the discount condition "This discount is not compatible with any other discount." I could not get the coupon to carry through from the cart to the checkout. Luckily I only have a couple of coupons and was able to specify all of them to prevent double discounts. I don't think this is a "coupon form on cart" issue (although I assumed it was for many hours of debugging) - I think it is a coupon issue.
Comment #112
torgosPizza@april26: See the issue at #2621526: Compatibility settings other than "all" causes Discount+Coupon to be removed.
Comment #113
msti#92 works for me as well
Comment #114
radamiel CreditAttribution: radamiel commentedhttps://www.drupal.org/project/commerce_cp - Commerce Cart Pane module allows to add Coupon form on cart page.
Comment #115
Alexandre360 CreditAttribution: Alexandre360 commented@radamiel
I don't see any option that allow me to put discount 2.x to the cart page, could you point me the procedure ?
thanks