0

Hello I need to show the actual price of the simple which belongs to currently viewed category instead of showing the lowest price of the configurable.

For example I have one configurable called A and 3 simples of that called B C D .

B-> belongs to Dresses -> trousers -> Man Category
C-> belongs to Dresses -> trousers -> Woman Category
D-> belongs to Dresses -> trousers -> Children Category

B -> 200 
C -> 300 
D -> 400

When I go to Man Category I want to show the price of B When I go to Woman Category I want to show the price of C When I go to Children Category I want to show the price of D

Currenty all shows 200 as it is the lowest price of the simples of Configurable product A.

How can I code that? Is it a setting or do I need to change some code in category view/list or etc..?

Thanks in advance.

1

This is a lot of work. And I don't think it is a good idea to implement this without caching/optimization.

What you theoretically has to do is:

  1. Get all simple products
  2. Check in which category you are
  3. filter simple products by categories
  4. hopefully you only have one left
  5. show the price

But the first three steps are (depending on the configurables per category page and simple per configurable) quite performance intensive!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.