jareq Posted February 6, 2013 Share Posted February 6, 2013 Is there possible to change price during order process in prestashop ? I need to make module that would add shipping price depending on some conditions (can't do it in presta, need module). I've tried to do it on some hooks (hookBackBeforePayment, hookBeforeCarrier, hookProcessCarrier, hookExtraCarrier) , i simply tried to change ['total_price'] or other variables that are passed to hook functions. Would appreciate any help. Link to comment Share on other sites More sharing options...
jareq Posted February 9, 2013 Author Share Posted February 9, 2013 Anyone ? Link to comment Share on other sites More sharing options...
PascalVG Posted February 10, 2013 Share Posted February 10, 2013 Maybe try to find how they do it when changing carrier in PS. Here they change price as well, so should be similar to existing carrier change, i'd say. Sorry, no time to explore tonight for you... but probably the carrier module self, or otherwise some controller. What version do you use?? 1 Link to comment Share on other sites More sharing options...
PascalVG Posted February 11, 2013 Share Posted February 11, 2013 <p>Maybe it helps to look how they update prices while (still in the product selection process) in the carriercompare module. Here they change prices ( real update seems to be done with this line: </p> <p> if (!$this->context->cart->update())</p> <div> </div> <div>But pre-conditions need to be change beforehand of course. In this case the user can choose a county and a carrier and the (shipping) price will change accordingly.</div> <div> </div> <div>Maybe this looks like what you need? Give it a look.</div> <div> </div> <div>My 2 cents,</div> <div>Pascal.</div> Link to comment Share on other sites More sharing options...
jareq Posted February 11, 2013 Author Share Posted February 11, 2013 Maybe try to find how they do it when changing carrier in PS. Here they change price as well, so should be similar to existing carrier change, i'd say. Sorry, no time to explore tonight for you... but probably the carrier module self, or otherwise some controller. What version do you use?? Hey, writing carrier module solved the problem. Thank you Link to comment Share on other sites More sharing options...
ricardopxl Posted March 31, 2014 Share Posted March 31, 2014 Hi Jareq, It has been a year .. but how did you do it? Greetings! Link to comment Share on other sites More sharing options...
enSysRanjit Posted February 9, 2015 Share Posted February 9, 2015 Hey Guys, Same requirement for me. It would be very helpful if you guys share you solution here. Thanks!!!! 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