dmuty Posted January 10, 2016 Share Posted January 10, 2016 Hi, I have a question about "Specific prices" : Apparently the specific price of a product is applied regarding the "Delivery address" of the customer. Where could I modify in order to make this price changing depending on the Invoice address ? Inside administration, I didn't see this possibility so I guess I must change directly on files...but where?? Thanks in advance ! Link to comment Share on other sites More sharing options...
roja45 Posted January 11, 2016 Share Posted January 11, 2016 Does changing the Based On to "Delivery address" in the Localization/Taxes/Tax Options (bottom of page) affect this? Looks to me that if you set this to delivery address it will pass the country id of this address through the pricing process, so you may get your specific price applied. Pricing system is awfully complicated to modify. Link to comment Share on other sites More sharing options...
dmuty Posted January 12, 2016 Author Share Posted January 12, 2016 Thanks for your answer. Yes this setting can change the value, but I'm looking for another way, because (unfortunately) I need at the same time to keep for example the Tax applied from "Billing address" and Specific Price based on "Delivery address" Link to comment Share on other sites More sharing options...
roja45 Posted January 12, 2016 Share Posted January 12, 2016 I don't really see anyway of doing it without overriding a fairly large chunk of the products class, and that class is so key to the inner workings of Prestashop that even testing it afterward would be a substantial task. Your prices are returned by Product::getPriceStatic() which gets your address id based on your tax setting which in turn passes this to Product::priceCalculation() which gets you SpecificPrice and TaxCalculator. The two things are pretty intrinsically linked, you'd have to someway get the delivery address id to get the specific price, and get the invoice id to get the tax calculator. (And these methods are called from everywhere; modules, controllers, templates, etc) Maybe you can create an override for both those methods, certainly a safer way to test it! Link to comment Share on other sites More sharing options...
dmuty Posted January 12, 2016 Author Share Posted January 12, 2016 Ok thanks !Maybe I should re-think the whole picture, as the Specific Price was used to implement a pretty specific shipping cost system when shipping products to international :Separate shipping cost by item, with price depending on country and categorie of product... (I couldn't find another way in Prestashop to implement that)If I could get rid of Specific price, I could keep the Tax applied from Billing Address from administration page, and then everything is fine Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now