You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming from Medusa v2, very glad Vendure is more flexible & understandable to overcome my specific use-cases. Thanks!!!
There're 2 fields I need to store:
rentPrice is contains price of each hour when user want to rent the product (Related entities: ProductVariantPrice).
rentHours is contains how many hours user want to rent the product (Related entities: Order & OrderLine).
After reading the documentation and understanding the reviews-plugin, I figure it out there are 2 possible options to use custom pricing when user wants to rent the product instead of buying it.
First Option: Add Custom Fields To ProductVariantPrice Entity
The downside of this option is I can't utilize the @Money decorator to handle the monetary value.
Second Option: Create a Custom Entity Like ProductVariantRentPrice To Store The Rent Price
The downside of this option is I need to manually extend the ProductVariantPrice Entity directly from the product-variant-price.entity.ts and keep it up to date to the source.
So which option is the most suitable for this case? Or any other recommended option to solve this case?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
There're 2 fields I need to store:
rentPrice
is contains price of each hour when user want to rent the product (Related entities:ProductVariantPrice
).rentHours
is contains how many hours user want to rent the product (Related entities:Order
&OrderLine
).After reading the documentation and understanding the
reviews-plugin
, I figure it out there are 2 possible options to use custom pricing when user wants to rent the product instead of buying it.First Option: Add Custom Fields To
ProductVariantPrice
EntityThe downside of this option is I can't utilize the
@Money
decorator to handle the monetary value.Second Option: Create a Custom Entity Like
ProductVariantRentPrice
To Store The Rent PriceThe downside of this option is I need to manually extend the
ProductVariantPrice
Entity directly from theproduct-variant-price.entity.ts
and keep it up to date to the source.So which option is the most suitable for this case? Or any other recommended option to solve this case?
Beta Was this translation helpful? Give feedback.
All reactions