I am trying to integrate the above affiliate system with my 1.4.9.2 installation. My site is very heavily customised so no I won't be updating to 1.5.0 to use the built in affiliate system.
Anyway, JAM does not include integration with OpenCart as standard but do suggest using 'Hidden Image tag' code to stick in the checkout success page. However I am not clever enough to be able to answer the questions their wizard asks to create the necessary code.
The wizard asks for:
Sale Amount Variable
AND
Transaction ID Variable
Neither of which I understand. Can someone help me with this?
Alternatively, they do list a code for Zencart and i wondered if some clever person could suggest an edit to this code to work with OpenCart:
########################################
## START JAM INTEGRATION WITH ZENCART ##
########################################
$JAM = $db->Execute("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders->fields['orders_id']."' AND class = 'ot_subtotal'");
$TotalAmount = number_format($JAM->fields['value'],2,'.',',');
$TransID = $JAM->fields['orders_id'];
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.homeprintstudio.com/affiliat ... "></script>";
######################################
## END JAM INTEGRATION WITH ZENCART ##
######################################
Any suggestions please?
Rob
Anyway, JAM does not include integration with OpenCart as standard but do suggest using 'Hidden Image tag' code to stick in the checkout success page. However I am not clever enough to be able to answer the questions their wizard asks to create the necessary code.
The wizard asks for:
Sale Amount Variable
AND
Transaction ID Variable
Neither of which I understand. Can someone help me with this?
Alternatively, they do list a code for Zencart and i wondered if some clever person could suggest an edit to this code to work with OpenCart:
########################################
## START JAM INTEGRATION WITH ZENCART ##
########################################
$JAM = $db->Execute("select * from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders->fields['orders_id']."' AND class = 'ot_subtotal'");
$TotalAmount = number_format($JAM->fields['value'],2,'.',',');
$TransID = $JAM->fields['orders_id'];
echo "<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.homeprintstudio.com/affiliat ... "></script>";
######################################
## END JAM INTEGRATION WITH ZENCART ##
######################################
Any suggestions please?
Rob
I know my place...!
Hi Jay, thanks for answering.
I think perhaps I didn't ask the right question..... doh! LOL
The wizard is actually asking what code OpenCart uses for these two items:
The default suggestions are:
Sale Amount Variable Code = amount
AND
Transaction ID Variable Code = trans_id
I guess I need to know if 'amount' and 'trans_id' are the correct codes used by OpenCart.
Rob
I think perhaps I didn't ask the right question..... doh! LOL
The wizard is actually asking what code OpenCart uses for these two items:
The default suggestions are:
Sale Amount Variable Code = amount
AND
Transaction ID Variable Code = trans_id
I guess I need to know if 'amount' and 'trans_id' are the correct codes used by OpenCart.
Rob
I know my place...!
you can use
for the transaction id
In order to pass the total you will need to edit your controller for the payment
Find this line
after it put
then you can use
for the amount field
Code: Select all
$this->session->data['order_id']
In order to pass the total you will need to edit your controller for the payment
Code: Select all
/catalog/controller/payment/pp_standard.php
Code: Select all
$remaining_total = $total - $product_total - $tax_total - $shipping_total + $discount_total;
Code: Select all
$this->data['transaction_amount'] = $total;
Code: Select all
$transaction_amount
Hi Jay
OK I did what you suggested and now have the code that I need to integrate into my site:
<img border="0" src="http://www.homeprintstudio.com/affiliat ... ion_amount&
trans_id=$this->session->data['order_id']" width="1" height="1">
Now the problem I have is that they suggest I put this code into the payment success page. However I am not sure where is best. Sure there is a checkout/success page (which if I am correct is situated in /catalog/view/theme/MYTEMPLATE/common/success.tpl. Is that correct?
The problem I see is that .tpl file is also used when logging out from the site - and maybe other places too, just with different text depending on what's occuring! So where would you suggest I put this code (polite answers please) to ensure that it is just invoked after a successful sale.
Thanks so much for your hlp.
Rob
By the way, these are the instructions from JROX:
To integrate JAM into your website / application using a Hidden Image Tag, use the following directions:
1. Click on Settings>System Integration, select Image Tag on the Integration Type drop down list.
2. Enter the variable name set by your payment processor for amount as the Sale Amount variable to use.
3. Enter the variable name set by your payment processor for transaction or order ID as the Transaction ID variable to use.
4. Enable and enter any more custom variables you want to record as specified by your payment processor. These may include product ID, customer ID, etc. You can name up to 5 different custom variables of your choice.
5. Click Save Integration Settings.
6. Open up your php landing or thank you page, and copy and paste the PHP Code into your web page. Make sure that all variables are correct.
OK I did what you suggested and now have the code that I need to integrate into my site:
<img border="0" src="http://www.homeprintstudio.com/affiliat ... ion_amount&
trans_id=$this->session->data['order_id']" width="1" height="1">
Now the problem I have is that they suggest I put this code into the payment success page. However I am not sure where is best. Sure there is a checkout/success page (which if I am correct is situated in /catalog/view/theme/MYTEMPLATE/common/success.tpl. Is that correct?
The problem I see is that .tpl file is also used when logging out from the site - and maybe other places too, just with different text depending on what's occuring! So where would you suggest I put this code (polite answers please) to ensure that it is just invoked after a successful sale.
Thanks so much for your hlp.
Rob
By the way, these are the instructions from JROX:
To integrate JAM into your website / application using a Hidden Image Tag, use the following directions:
1. Click on Settings>System Integration, select Image Tag on the Integration Type drop down list.
2. Enter the variable name set by your payment processor for amount as the Sale Amount variable to use.
3. Enter the variable name set by your payment processor for transaction or order ID as the Transaction ID variable to use.
4. Enable and enter any more custom variables you want to record as specified by your payment processor. These may include product ID, customer ID, etc. You can name up to 5 different custom variables of your choice.
5. Click Save Integration Settings.
6. Open up your php landing or thank you page, and copy and paste the PHP Code into your web page. Make sure that all variables are correct.
I know my place...!
catalog/language/english/checkout/sucess.php
Find
Replace with
That should work, it passes html so no reason why it cant grab php?
Do the same for every language file you use.
Find
Code: Select all
$_['text_message'] = '<p>Your order has been successfully processed!</p><p>You can view your order history by going to the <a href="%s">My Account</a> page and by clicking on <a href="%s">History</a>.</p><p>Please direct any questions you have to the <a href="%s">store owner</a>.</p><p>Thanks for shopping with us online!</p>';
Code: Select all
$_['text_message'] = '<img border="0" src="http://www.homeprintstudio.com/affiliates/sale.php?amount=$transaction_amount&
trans_id=$this->session->data['order_id']" width="1" height="1"><p>Your order has been successfully processed!</p><p>You can view your order history by going to the <a href="%s">My Account</a> page and by clicking on <a href="%s">History</a>.</p><p>Please direct any questions you have to the <a href="%s">store owner</a>.</p><p>Thanks for shopping with us online!</p>';
Do the same for every language file you use.
That won't work. At that point, the order id has been removed from the session...even if it did, the php in the string wouldn't be executed. There's no simple way around this I'm afraid Rob. Didn't realise you needed to put it on the success page, I thought you just needed to associate an order id with an affiliate
Yes I tried this SXGuy but I get:
Parse error: syntax error, unexpected T_STRING in /home/homeprin/public_html/store/catalog/language/english/checkout/success.php on line 7
on checkout/success page!
Thanks anyway for helping. Damn there must be a solution!
Rob
Parse error: syntax error, unexpected T_STRING in /home/homeprin/public_html/store/catalog/language/english/checkout/success.php on line 7
on checkout/success page!
Thanks anyway for helping. Damn there must be a solution!
Rob
I know my place...!
Jay
I need to be able (according to JROX) to associate a sales value to pay % commission to affiliate. Quite frankly all I want to do is pay the affiliate for having the banner on their site and for someone to click it to make them money... how hard can it be?
I think you are correct. I could always put it in the checkout/confirm page could I not? At least if a customer has got that far he is likely to go through with the sale.
OR, how about this. How about a custom success page? Not sure how to create it or how to make paypal come back to it but seem like a possibilty do you think?
Rob
I need to be able (according to JROX) to associate a sales value to pay % commission to affiliate. Quite frankly all I want to do is pay the affiliate for having the banner on their site and for someone to click it to make them money... how hard can it be?
I think you are correct. I could always put it in the checkout/confirm page could I not? At least if a customer has got that far he is likely to go through with the sale.
OR, how about this. How about a custom success page? Not sure how to create it or how to make paypal come back to it but seem like a possibilty do you think?
Rob
I know my place...!
Well chaps, i contacted JROX to ask if they planned to support OpenCart and they told me that they had no immediate plans to. I told them that OpenCart was a fast upcoming force to be reckoned with, yadda yadda and they told me that they would 'have a go' at integrating with OpenCart for me..... for a mere $99.
Taxi !!!!!
Rob
Actually I am checking out Vaffiliate and although it doesn't look as good and was written with no real grasp of the english language it seems quite easily to edit css, txt etc. and has an opencart integration as standard.
Watch this space.
Taxi !!!!!
Rob
Actually I am checking out Vaffiliate and although it doesn't look as good and was written with no real grasp of the english language it seems quite easily to edit css, txt etc. and has an opencart integration as standard.
Watch this space.
I know my place...!
ok...
your right, the data does get unset before it reaches that page, however, you could pass the two types of data you need to the sucess page before the controller file unsets the data.
Why not post the two peices of data to the sucess page before it is unset in the sucess.php controller file.
Then the sucess view file grabs that data if posted and creates the banner?
your right, the data does get unset before it reaches that page, however, you could pass the two types of data you need to the sucess page before the controller file unsets the data.
Why not post the two peices of data to the sucess page before it is unset in the sucess.php controller file.
Then the sucess view file grabs that data if posted and creates the banner?
Like what SXguy said. Do the following
Add to catalog/controller/checkout/success.php at line 5 (must be before $this->cart->clear();)
Then in checkout/success.tpl add this:
I haven't tried it personally, but it should work.
Add to catalog/controller/checkout/success.php at line 5 (must be before $this->cart->clear();)
Code: Select all
$this->data['jam_total'] = $this->cart->getTotal;
$this->data['jam_order_id'] = $this->session->data['order_id'];
Code: Select all
<img border="0" src="http://www.homeprintstudio.com/affiliates/sale.php?amount=<php echo $jam_total; ?>&
trans_id=<php echo $jam_order_id; ?>" width="1" height="1">
Ecommerce Extensions - Need custom development work? Feel free to send us a PM at anytime to discuss things further.
Hi,
Wondering if you got a solution to this finally.
Am running OC 1.5.3 and am trying to integrate JAM Affiliate program with my OC installation. Please I want to know how you got through with yours.
Please any kind suggestion will be appreciated.
Thanks
Wondering if you got a solution to this finally.
Am running OC 1.5.3 and am trying to integrate JAM Affiliate program with my OC installation. Please I want to know how you got through with yours.
Please any kind suggestion will be appreciated.
Thanks
Who is online
Users browsing this forum: No registered users and 8 guests