Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Sale Products & Quantity Pricing for Group Memberships #2080

Closed
sumwonlost opened this issue Jun 20, 2018 · 6 comments
Closed

Bug - Sale Products & Quantity Pricing for Group Memberships #2080

sumwonlost opened this issue Jun 20, 2018 · 6 comments

Comments

@sumwonlost
Copy link

sumwonlost commented Jun 20, 2018

I use Customer Memberships, when I go to Admin -> Products (select a product) -> Pricing the dropdown lists Retail Pricing followed by any Group Memberships.

For now I leave it on Retail Pricing and enter a value in Retail Price and Save. On Save it updates prices for product in inventory table and creates a record in pricing_group table for each of the Membership Groups for the Product.

Now in Product (Retail Pricing) add a value for Sale Price and Save.

Goto frontend - The Product retail price and sale price display correctly everywhere.

Now login as a Customer that has a Membership Group associated. The Product retail price and sale price display correctly everywhere except it no longer display in the "On Sale" box in RHS. Bug - this should still display here.

Next let's do the same with Quantity Pricing. Under Retail Pricing enter Quantity Pricing and Save. On save it creates record/s for Product (product_id) in pricing_quantity table with group_id == 0

Goto Frontend (Logged Out). The Product display Quantity Prices correctly.

Now login as a Customer that has a Membership Group associated, Bug - the Product does not display Quantity Pricing, it should display it.

If customer_membership.group_id== pricing_quantity.group_id it display Quantity Pricing for the Membership Group elseif group_id == 0 it display Quantity Pricing (Retail Pricing)

Retail Pricing - Retail Price, Sale Price and Quantity Price should be default values unless superseded by Selecting a different Membership in Product Pricing

@Noodleyman
Copy link

based on your description. it's working correctly. both the price and sale price are customer group specific. in your example you've only mentioned setting a sale price at the retail group.

you need to configure everything at each group level.

@sumwonlost
Copy link
Author

Is that right? So why does it display Retail Pricing Group (Retail Price) if I have no Retail Price set for a Group? Therefore this is the BUG and should not display products for Customer Groups if Retail Price has not been set for their Group.

BUT understandably it does not work this way as your method of configuring at each level would be tedious. If no Retail Price is entered in a Membership Group it defaults to Retail Price set in Retail Pricing Group.

The same should apply for Sale Price and Discounts.

Please follow steps in 1st post up to

"Now login as a Customer that has a Membership Group associated. The Product retail price and sale price display correctly everywhere except it no longer display in the "On Sale" box in RHS. Bug - this should still display here."

The Product display in "On Sale" page but no longer is displayed in "On Sale" box in RHS which it was before Customer Login.

So is the Product On Sale or not?

@sumwonlost
Copy link
Author

sumwonlost commented Jul 2, 2018

Unless superseded by entering values (Retail Price and Sale Price) by setting these for Groups it defaults to these for Retail Pricing, this part work correctly. It should do the same for Quantity Pricing.

Much simpler, less tedious and less db resources than configuring each group

@Noodleyman
Copy link

Noodleyman commented Jul 2, 2018

not displaying products because you've not set a price is different, that's a security model thing. (note, I've a security module that can do this for you available on the marketplace).

The prices are designed to work "per group", and yes, it's tedious if you have many groups. It doesn't waterfall in the way you are describing.

when you say "if no retail price is entered it defaults to the retail price", is correct. having no price defined is invalid, so it always needs a price.. in which case it will clone the retail price on save. NULL price is invalid. this is the initial price, which gets defined at that group level, it is not "linked" to the retail price, it's an initial value.

your expecting waterfall logic and it doesn't work in this way.

@sumwonlost
Copy link
Author

sumwonlost commented Jul 4, 2018

"Waterfall logic" and a "security model thing", I'll explain logic and where is the "security model thing?". Why do I need a plugin for what is technically a BUG.

I get different outcomes on how products are created and edited for Groups which affect how these are displayed. I will go through each (I will assume you have min 2 Groups set up and a Customer associated to a Group).

Goto Add Products (for now leave status checked when creating Products in Steps below)

  1. Create a Product and in Categories Tab - Assign a Category and Save. Do not enter anything in Pricing. It save the Product in Inventory table with 0.00 values for Retail and Sale Price. It does not create any records in pricing_group table.

  2. Now make an edit to Product or Product Category and Save or just Save page again with no edits. It now create (clone) Retail Price and Sale Price (0.00 values) for ALL Groups in group_pricing table.

The 1st question I ask is why does it only clone on Edit and not Add if it is to clone 0.00 values?
The 2nd question is why does it need to clone at all if values are 0.00?

  1. Create another new Product and then in Categories Tab - Assign a Category then click Pricing Tab and in Retail Pricing enter values for Retail Price and Sale Price and Save. It save the Product in Inventory table with values entered for Retail and Sale Price. It does not create any records in pricing_group table.

  2. Now make an edit to Product or Product Category and Save or just Save page again with no edits. It now create (clone) Retail Price and Sale Price (values entered) for ALL Groups in pricing_group table.

The 3rd question is identical to 1st question?
The 4th question. Using this method in effect is global as it enters the same values for ALL groups. So why does it need to clone these? To verify this go to pricing_group table and delete the entries associated to this product and those created in Item 2. It uses the values set in inventory (Retail Pricing) and in effect a waste of resources.

  1. Goto Product created in Item 1 -> Pricing and under Retail Pricing enter a value for Retail Price and Sale Price. It updates prices in inventory table and it re-clones the entries deleted in 4th question with the same values entered above.

The 5th question is the same as the 4th.

  1. Go to above Product -> Pricing and select a different Group and edit both or either Retail Price or Sale Price and Save. It updates prices for the selected group in pricing_group table.

  2. Let's run a test. Goto to pricing_group table and delete any other entries for the product except the one in Step 6.

The 6th question - Why clone at all??? My previous 5 questions are now redundant. It should only add to pricing_group the Group/s where Retail Price AND/OR Sale Price have been added. This eliminates 100's if not 1000's of obsolete (useless) entries (Total Groups x Total Products), Simply if no entry exist for a Group in pricing_group it defaults to Retail Pricing.

Currently there is a Bug with how "On Sale" products are displayed in RHS box. My recommended method has no Bugs on how these are displayed whilst also saving on resources and having a uniform outcome for Product Pricing for groups whether added or edited. Now we have a global default unless superseded.

The last thing remaining is to add a Global checkbox under Retail Pricing. If checked it delete any entries for all Groups for the Product from pricing_groups table on Save. Now it uses the prices from inventory table.

Please test until your hearts content, there are no bugs and method works correctly (display correctly in front end, everywhere for both logged out and logged in Customers with/without a Group and with what I can see no "security model thing"

I won't go into the virtues of Quantity pricing, It is the addition of 1 if/else statement as outlined in my first post.

Sorry about the number of edits as i want to describe it correctly.

@abrookbanks
Copy link
Member

Looks like this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants