Wednesday 31 July 2019

how do i store a product with multiple prices depending on the size?

im building an online store using express,mongo, and mongoose.For example i have shampoo bottles in different sizes where the price changes based on the size.350ml = $25700ml = $481400ml = $902800ml = $170Each productId and price will change but the sizes will always be the same.Then from my page the user will be able to use a dropdown to select the size then update the price and when they click add to cart ill need to add that productid with the size and price.​I think this problem has more to do with how im saving my product schema but im pretty new to this and having trouble finding info on mongoose.​thanks

Submitted July 31, 2019 at 10:08PM by canadiandime

No comments:

Post a Comment