I want to use this module with price_savings_formatter, but i can't figure out how because coupon module relies completely on Order , so when there is no order it's not possible to use its rules since they all get line item from order.
I tried making an order object on the fly , but it's no possible because for adding products to order it much be saved in database first

Comments

pcambra’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not sure about your question, an order is created when you've got something in your cart (a cart is just an order in a given status), and there's no way you can apply a coupon without doing that first so you should have an order object available once you've added something to the cart.
Can you share your set of rules and provide more info to better evaluate the issue?

sinasalek’s picture

Thanks for the response,
Lets describe it in some other way then,
In some websites you can activate promotions (coupon) via links, something like example.com?promo=CC110
When user comes into the website with this link, he can see the effect of the coupon on product prices before he order anything.
And when he checkout that promotion automatically applies to his order

The url part can be implemented using a custom module, so when the user comes with promo link the the module makes a cookie so it can be referred later in product pages and checkout. If custom module also integrate with rules it becomes possible to use the cookie promo code in conditions and actions. (This module can also be part of coupons module as new feature :) )

That last part which is showing the new price depending on promo has can also be taken care of by commerce pricing rules and price saving formatter.

What remains is the actual promo codes which could be taken care of by coupon module. But as i mentioned it's not possible. Because coupons module api depends on Order so it's no possible use coupons validation and prices rules for this purpose because there is no order yet. Therefore the solution might be to either hack coupon to make it possible to use it's API for products as well (without order) or make a new module out of coupons with more flexible API which is a pointless fork.

So the whole point is, if it becomes possible to use coupon api and rules directly on products , this feature can be implemented

Regarding to set of rules you mentioned, i though alot about how to use coupon validation rule for this purpose but as i mentioned there is no way, so i couldn't create the rule i needed.
Pricing rule however can be created since coupons are entities

Let me know it's clear now :)

threadsniper’s picture

I am also having this issue. And realized the hard way that it wasn't working after several customers made formal complaints. Is there a workaround in the pipeline?

threadsniper’s picture

No traction on finding a fix for this issue. What information does the maintainer need to move this along? I use price-savings formatter on nearly every e-commerce deployment, so finding a fix for this is imperative.

pcambra’s picture

Status: Postponed (maintainer needs more info) » Postponed

What information does the maintainer need to move this along?

I can't say more than this is a feature request and honestly is nowhere in the roadmap of the module, so if someone wants to provide a patch, I'll happily review it.

threadsniper’s picture

The congruent functionalities of providing coupons to customers and displaying sale prices is fairly common on most stores. While you feel this isn't in the roadmap of the module, I feel pretty strongly that not having these two features working in tandem with one another is going to reduce revenue opportunities on larger stores, such as our own.

If anyone is willing to assist us in overcoming this problem, it would be greatly appreciated. We would be willing to provide a reasonable consulting fee.