JPRIETO Posted February 21, 2011 Share Posted February 21, 2011 just before the cart sent total amount to paypali need to get the sub-total WITHOUT tax and WITHOUT shipping costso that this sub amount can be sent to my affiliate programi am using jrox jam affiliate managerright now the cart is sending the FULL amount (tax and shipping also) to my affiliate program which then calculates commission on the sale .... but the commission is based on an amount which includes tax and shipping cost -- thats no good!here is the code i put in order-confirmation.php------------------------To integrate with Prestashop, follow these steps: 1. Open up order-confirmation.php for editing. 2. Find the following lines and add the highlighted code: $JAMIntegrate = file_get_contents("http://www.domain.com/affiliates/sale.php?amount=".$order->total_paid_real."&trans;_id=".$id_order."&custom;_mid=".$_COOKIE['jrox']); 3. Save the file and reupload back to your Prestashop folder.----------------------------------------------do i need to modify this code?or do i need to modify a prestashop file (if so, which one, its path?) ??thanks Link to comment Share on other sites More sharing options...
Zenith Posted February 21, 2011 Share Posted February 21, 2011 Change: $order->total_paid_real To: $order->total_products Will give you total of products only - without tax & shipping Link to comment Share on other sites More sharing options...
JPRIETO Posted February 21, 2011 Author Share Posted February 21, 2011 hi thank you for your assistancei tried it but no amount was set to the affiliate programthe sale did not registeredis there another way?with the origian code, is the amount being sent by the cart .. or by paypal? Link to comment Share on other sites More sharing options...
JPRIETO Posted February 22, 2011 Author Share Posted February 22, 2011 Aha!YOU were so right ..... it works great JUST AS YOU SAID .....i had gone stright into the shop bypassing affiliate link, thats why it no worked beforeas soon as i took notice, i retried it with just the change you said and it worked peect!!THANKS Link to comment Share on other sites More sharing options...
NextStepsBoutique Posted April 15, 2011 Share Posted April 15, 2011 Hi JPrieto,Saw your question over in JROX forums then found you here with the answer. Glad you got it sorted. I'm thinking about using JAM with PrestaShop and wondered if you are still happy with the combination? Link to comment Share on other sites More sharing options...
JPRIETO Posted August 19, 2012 Author Share Posted August 19, 2012 yes, im happy .... it works so sorry for reply delay Link to comment Share on other sites More sharing options...
Recommended Posts