How to set custom price in opencart products?

≡放荡痞女 提交于 2019-12-23 12:26:04

问题


I have downloaded the latest version of opencart (3.0.2.0). The pricing of my product depends on various options viz. size, color , quantity.

For quantity, is there any feature by default to set price range, like for 1-500 pieces one price, from 501-1000 discounted price? My products are wristbands, so I calculate price based on text they want to print, size of the band, quantity range. By default opencart has feature for options but my options have sub options (dependent options).

I read other answers on the community for dependent options but could not find a working solution and same for passing custom price. How can I edit the core files so that custom pricing works?

Product data is saved on database and so is the price. But as users customize the product I want to change the price. The price change should reflect in shopping cart and should remain same through out the checkout. How to create sub options in opencart? Creating sub options with prices would solve my custom pricing issue too.


回答1:


You can set different price range by using the default discount functionality provided by opencart :-

In admin section click on edit for some product you want to set different price range to; then go to discount tab and fill entries as below:

quantity  priority  price
   6         0        50
   11        0        45
   16        0        40

Let say product price is $100. Based on above discount scenario will be like:-

qty <= 5 price will be $100/unit; 
qty > 5 price will be $50/unit; 
qty > 10 price will be $45/unit; 
qty > 15 price will be $40/unit;

Alongside you can use option in normal way. Whichever option selected by customer based on that prices will add/sub.

There is no need to set sub option to manage different price range.



来源:https://stackoverflow.com/questions/45720224/how-to-set-custom-price-in-opencart-products

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!