Affiliate Subtotal Tracking without TAX

I didn’t really know how to phrase the title of this properly. I am using an external affiliate system and I need to pass any completed orders to them for processing.



I have to pass 2 things.


  1. subtotal of the purchase
  2. order ID, or invoice number



    Here is what I have added… to customer/views/orders/details.tpl



    {literal}





{/literal}

It seems to work except it is passing TAX along. I don't want to pay commissions on TAX.

Any help would be greatly appreciated.

Thanks!

Chris,

I am also using shareasale. Did you get this sorted out?

What did you end up with so that the tax is not included? Should be the subtotal after discounts applied and I think, before shipping added. Where did you put the code?

I have 2.1.2 and was wondering if the code could be entered in an html block on the Order Landing Page.

Thanks,

Bob

A few things to consider here… But you’re probably going to have to capture the order_subtotal (which is the order total minus shipping) which you have done.

To get the total tax for the order, you will use $order_data.tax_subtotal. Then you’ll have to do something like


{math var="net_order" expr="x-y" x=$order_data.order_subtotal y=$order_data.tax_subtotal}


(check the syntax of math, it’s from my head which is not reliable!)



Then you would use {$net_order} for the amount you send the vendor.



This should really be done in

2.0.x: skins//customer/addons/my_changes/hooks/orders/confirmation.post.tpl

2.1.x: skins//customer/addons/my_changes/hooks/checkout/order_confirmation.post.tpl



Where and how you have it now will send the info anytime a customer views an order.

Hi,

I used the My Changes/Hooks method and put the share-a-Sale code in a file:

order_confirmation.override.tpl (per cs-cart support)



I was able to check that what I configured and confirm that it works for orders processed using pay by check and credit card payment methods.

I am not sure how to test with Amazon Payments, PayPal Standard, PayPal Express. Share-a-sale noted that PayPal also has the Bill me Later method integrated and said I should also check this.

Do all customers who use these alternative payment methods directed to the same Order_confirmation page? How do I test using a live cart. PayPal and Amazon won’t let me do a real test order using my own account.

Thanks,

Bob

share-a-sale wouldn’t be dependent on the payment processor would it? Hence same code would run for any completed order.



Can’t help you on the test orders for Az or PP, maybe setup or use a different account?

Share a sale is not dependent on processor. I just need to make sure that after all transactions the customer goes to the same page. I should not have to test if this can be documented.

I just had an amazon transaction and the last page is /index.php?dispatch=checkout.complete&order_id=1331.

I think this is the last page of other transactions.

Bob

That should be the landing page for all transactions that are successful (you don’t want to record a sale for an incomplete transaction). That is the page where the hook is called from.