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

Multiple selectable properties + update order price #183

Open
kevin-invato opened this issue Jan 13, 2023 · 2 comments
Open

Multiple selectable properties + update order price #183

kevin-invato opened this issue Jan 13, 2023 · 2 comments

Comments

@kevin-invato
Copy link

Hello,

We are currently building a webshop for a local office furniture company, but we are running into some challenges with certain products:

They have certain office chairs and desks that have multiple properties, and we want the visitors to be able to choose which properties they want to add to the cart/order, ie.:

Page/product: Office desk

Color: brown, sand, or white
Height: 70-150cm, 80-160cm or 90-170cm
Corner: Yes / No

Right now, we would have to add a **** ton of trade offers, which is not ideal since there are hundreds of products with a lot of variations. Is there a way we can achieve the above, without having to add hundreds of variations? Also, some of these options have an additional price (+ 10 euro, +15 euro, etc.)

We came up with a solution, but only half of it works:

Right now, we’ve extended/altered the properties/property value models with new fields:

  • Price
  • Image (to show what color for example)

That way, we can add a price to the property values, because some properties are more expensive. This works and when I add a product to the cart, the selected product and property are in the cart. But we haven’t been able to change the order price of the product. So when the visitor wants to order and pay, they only get the original price.

Is it possible -and if so, how- to update the price based on the selected properties?

If not, is there another way to achieve this?

Thanks in advance!

  • Kevin
@kevin-invato
Copy link
Author

Any ideas about my question?

@kharanenka
Copy link
Contributor

kharanenka commented Jan 23, 2023

Hello! You can try next solution:

  1. Add custon promo mechanis to increase/decrease price of cart positions with using shopaholic.order.promo_mechanism.cart.add_class event.
  2. Save addition data to order (properties and prices) with using shopaholic.order.update_data event.
  3. Create order promo mechanosm and attach it to order with using shopaholic.order.after_create event
  4. Apply increase/decrease logic for price of order positions with using shopaholic.order.promo_mechanism.order.add_check_callback_method event

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

2 participants