View Full Version : oscommerce step by step
gauz
22nd November 2004, 08:38 AM
I have just purchased POST Affiliate Pro and it was setup for me on my server, But now I try (learn) to integrate it with osCommerce.
My question is, i want my specific produk on my oscommerce have own banner, with specific commision price.
Please, tell me the step.
mark
23rd November 2004, 05:59 PM
Hello,
you can use "Force product category by product ID" setting, it will allow you to use specific commissions specific product.
Check more about this in FAQ on this site.
regards,
mark
gauz
26th November 2004, 11:25 AM
Oke
but first i will trying to integrate it to oscommerce.
in your documentation of how to integrate with oscomerce, there is code to place on checkout_success.php
My question:
1.) there is 2 line with code
if ($global['global_product_notifications'] != '1') {
-----
In line 40 and line 81
Wich one i place, the first one with complete code like this:
if ($global['global_product_notifications'] != '1') {
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
$orders = tep_db_fetch_array($orders_query);
$products_array = array();
$products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
$products_array[] = array('id' => $products['products_id'],
'text' => $products['products_name']);
}
}
?>
Or the second one, in line 81
<?php
if ($global['global_product_notifications'] != '1') {
echo TEXT_NOTIFY_PRODUCTS . '
<p class="productsNotifications">';
$products_displayed = array();
for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
if (!in_array($products_array[$i]['id'], $products_displayed)) {
echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '
';
$products_displayed[] = $products_array[$i]['id'];
}
}
echo '</p>';
} else {
echo TEXT_SEE_ORDERS . '
' . TEXT_CONTACT_STORE_OWNER;
}
?>
2.) What is "Simple Template System" of oscommerce, there is another??
How to know that?
3.) In " POST Affiliate Pro Merchant Panel" in menu Profile -> Integration, i find code for php.
if($_GET['a_aid'] != '')
print "http://192.168.0.6/php/affiliate/scripts/t2.php?a_aid=".$_GET[";
Is this needed to placed to on my oscommerce? exaple on my header.php?
mark
27th November 2004, 09:40 PM
Hello,
the code should be placed before the first appearance of that line, on line 40.
Simple Template System is templating system for osCommerce. If you did not install it before, then you most probably don't have it. osCommerce can work also without it.
if($_GET['a_aid'] != '')
print "http://192.168.0.6/php/affiliate/scripts/t2.php?a_aid=".$_GET[";
If you use new version of linking style (check Settings in merchant control panel), then this code should be put into every target page.
The target page is page where your banners or links will point.
Usually it means only putting it into index.php file.
hope it helped,
mark
gauz
29th November 2004, 01:17 PM
I think i find a froblem,
im my debug report i find this notice:
notice Sale registration: Start registering sale, params TotalCost='489.9900', OrderID='12', ProductID='' sale.php 12
And
notice Sale registration: No product category for product '' SaleRegistrator.class.php 112
how to resolve this??
mark
30th November 2004, 04:43 PM
Hello,
most probable problem here is that you set 'Force choosing commission
by product ID' to Yes, but you are not passing any product ID to the sale registration script.
Then the system cannot find category for this product ID.
Do you neet this setting (Force choosing commission
by product ID) enabled? It makes sense only if you have more product categories, every with different commission settings.
If you'll disable it, I think it will solve your problems.
regards,
mark
gauz
2nd December 2004, 01:29 PM
Sorry, i ask a question again :P
so, how to specified each banner to each product on oscommerce.
for example, i create banner for keyboard & speaker in post affiliate.
they have different commision. for example 100 for mouse and 50 for speaker
I place index.php of oscommerce for all banner.
and in my oscommerce, the keyboard have product id 25 and speaker 26
the link for mouse on oscommerce:
http://www.mydomain.com/shop/product_info.php?products_id=25
when i click the keyboard's banner (its mean i go to index page of oscommerce), then i choose other product, not keyboard. For example i choose speaker.
so, the transaction is registeredfor keyboar.
off course I don't want it happen. How to handle that??
gauz
3rd December 2004, 10:27 AM
maybe, post affiliate can get the product id from oscommerce automaticly?.
then sincronize commision price for each product?
mark
4th December 2004, 12:21 AM
no, it cannot get product id automatically.
It is quite complicated, because your customer can buy for example mouse and keyboard in the same order. Which commission should be applied then?
I think it will be too complicated if you'll try to implement product specific commissions into osCommerce shopping cart. It works best with % commission, same for all products.
If you really need to make it, it is generally possible. It would require looking into osCommerce database which products were bought in the last order, compute the sale commission for every product, make sum of those commissions and save it as one transaction. Possible, but very difficult. And it would require serious additional develoment.
So consider if you really need something like this.
regards,
mark
gauz
4th December 2004, 11:26 AM
ok, thank for ur support!
atapi
5th December 2004, 07:22 PM
hi all
im using oscommerce shopping carts for my clients
and they all want to pay different amounts for products
I belive there might aleady be some free affiliate scripts just for oscommerce
I purchased this script because it was sopposed to work with both my paypal and my oscommerce install. but im just figuring out that I cant assign product commissions to each product.
my client currently has 1 item which cost $200 and she has the rest of the cart with $5-$8 items she wants to have people pushing her 200 product but doesnot want to give them commission on the cheap items
a per product commission would solve alot of this problem
any chance of getting this?
mark
5th December 2004, 11:51 PM
ok, when you all want it, it seems we have to implement this stuff :)
I have to reconfirm that it is possible according to my initial idea, if yes
it should be ready this week.
special question for atapi: as i checked your posts in other forum topics, you are using quite special way of integration with paypal and oscommerce.
What we will do will work with normal integration with osCommerce using the invisible image(s) on thank you page, so it may not work for you.
But if you use your own IPN call handling, it should be possible to trigger sale registration from there, and pass correct product ID to force system to apply the correct commission..
regards,
mark
atapi
9th December 2004, 11:42 PM
hi
I looked at the paypal code you guy have there
is there anyway to just the the part of the code that registers the sale pulled out since I dont need all that paypal stuff.
thanks
mark
10th December 2004, 03:18 PM
Hi,
check this topic:
http://forum.qualityunit.com/viewtopic.php?p=521#521
regards,
mark
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.