Menu
Product
Showcase
Partners
Community
Resources
Services
Sign Up / Log In
Try It Now
Download
Product
Showcase
Partners
Community
Resources
Services
Sign Up / Log In
Forums
Search Forum
Search
Advanced Search
Topics
Posts
Unanswered
Active Topics
Prev
Go to previous topic
Next
Go to next topic
Last Post 6/20/2020 7:53 AM by
3ART Technologies
Coupon code not implement on cart items
2 Replies
0 Subscribed to this topic
1 Subscribed to this forum
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
3ART Technologies
Basic Member
Posts:37
6/20/2020 7:03 AM
Hi,
From the backend C#, I want to implement the coupon code at "CART Page". "The Add a Promotional Code:" is not adding in the order service.
The below code returning me True, but when I see the list of coupon code under my cart list it will exist empty.
var HccApp = HccAppHelper.InitHccApp();
var cart = HccApp.OrderServices.CurrentShoppingCart();
bool returnValue = cart.AddCouponCode(coponCode);
Can anyone tell me why it is behaving like that? or there is some other class to add the coupon code in the cart item
[img=https://i.ibb.co/v3n9wS4/checking.png]nothing[/img]
Regards
3ART Technologies
Basic Member
Posts:37
6/20/2020 7:45 AM
The function adding the item into the list but not value is not saving into the database, did I need to update the cart if yes please inform me what is the function for it
3ART Technologies
Basic Member
Posts:37
6/20/2020 7:53 AM
Found the solution
var HccApp = HccAppHelper.InitHccApp();
var cart = HccApp.OrderServices.CurrentShoppingCart();
cart.AddCouponCode(coponCode);
// Important to update your cart
HccApp.OrderServices.Orders.Update(cart, true);
bool returnValue = cart.AddCouponCode(coponCode);
return returnValue;
You are not authorized to post a reply.
Private
General
--Ask Anything
--Content Management
--Customer Experience
--Marketing
--SEO
Merchants
--Catalog Management
--Marketing/Promotions
--Order Management
--Payments
--Shipping
--Store Administration (General)
Designers
--Themes
--Viewsets
--General Design
Developers
--Extension Points (Store-Relate...
--Implementation
--Installation and Upgrade
--Module Development
--General Development
Forums
Developers
Module Development
Sign-up for the Hotcakes Community Newsletter:
E-Mail Address