webdna / commerce-bulk-pricing

Other
2 stars 2 forks source link

Bulk price is not applying related sales. #7

Closed webrained closed 3 years ago

webrained commented 4 years ago

Hi, I'm using bulk price plugin for my craft commerce website and it works for product variants, but when I append related sales to that variant bulk prices, plugin doesn't decrease the sale value.

mcjackson18 commented 4 years ago

@webrained can you give an example of a sale you're trying to use - thanks.

webrained commented 4 years ago

@mcjackson18 I created new sale and assigned that sale to specific user groups. Then I created and filled new bulk price for product variant and beyond the price supertable I filled related sales, with my created sale. In twig template I can't get the discounted price.

If you want I can put here some screenshots, of my cpanel options and dump in twig template.

webrained commented 4 years ago

image (10)

See above, I have 3 prices for this variant and added related sales

webrained commented 4 years ago

image (11)

This screenshot is showing the dump in twig template, so you can see it's returning just the base. prices, not discounted ones.

webrained commented 4 years ago

Is anyone here?

webrained commented 4 years ago

In your last commit I just can see something half baked, can you please elaborate about how's working the beyond:

https://github.com/KuriousAgency/commerce-bulk-pricing/blob/acc74756496cbac783fdab296ccec8c6960a8d7f/src/BulkPricing.php#L127

In both 127 and 128 row i can see that: $event->lineItem->salePrice = $value; $event->lineItem->price = $value;

In both cases it's assigning to $value.

And I need ability to show salePrice also before it's beginning to be lineItem, but also in product details page, so please let me know when can I expect those fixes.

Best regards Arman T.

mikeymeister commented 4 years ago

Hi Arman, I hope you can accept our apologies for a slow response, our productivity has been affected by the current global coronavirus pandemic.

The plugin currently is not compatible with commerce sales, the bulk price overrides any sales that apply. The previous commit resets the sale price to the reduced bulk price. This was required to fix issue #5 and an issue with another plugin.

I have made some changes to allow sales to modify the bulk price in the development branch. Can you see if this fixes the problem you are seeing.

The plugin does not make changes to the purchasable until it becomes a lineItem because it requires the quantity value of the lineItem. Perhaps I am misunderstanding your final point?

CMeldgaard commented 3 years ago

@mikeymeister when will the changes regarding the sales you made in the develop branch make into production ?

mcjackson18 commented 3 years ago

@CMeldgaard, version 1.1.6 now supports Commerce Sales.

terryupton commented 2 years ago

Hey @mcjackson18 is there a way get the bulk discount sale price for showing this in a template? Similar to the native selectedVariant.salePrice ?

Thanks