Đang Thực Hiện

164229 OSCommerce Affiliate Mod

OSCommerce Affiliate Mod

Goal - Integrate the JROX Affiliate System with OSCommerce Shopping Cart to provide a limited per PRODUCT commission

capability.

Background - The client OSCommerce shopping cart contains SPECIAL PRODUCT 1 and SPECIAL PRODUCT 2 that allow a 20% commission for affiliates. All other products provide a 5% commission.

This is the existing JRox Affiliate code that allows a flat percentage commission per order.

###########################################

## START JAM INTEGRATION WITH OSCOMMERCE ##

###########################################

$JAMTotal = tep_db_query("SELECT value FROM " . TABLE_ORDERS_TOTAL . " WHERE orders_id = '" . (int)$orders['orders_id'] . "'

AND class = 'ot_subtotal'");

$JAMTotal = tep_db_fetch_array($JAMTotal);

$TotalAmount = number_format($JAMTotal['value'],2,'.',',');

$TransID = $orders['orders_id'];

echo '<g border="0" src="[url removed, login to view]'.$TotalAmount.'&trans_id='.$TransID.'" width="1"

height="1">';

#########################################

## END JAM INTEGRATION WITH OSCOMMERCE ##

#########################################

This is standard integration code common to many affiliate programs. It sends an order amount and transaction ID to JROX.

JROX logs it and the affiliates get paid. Because we need a 20% commission and a 5% commission, we will change the above code to send 2 transactions.

Solution -

The above code finds the Sub Total before shipping from the orders total table.

THEN:

For the given order ID, You will add code to search the orders_products table for the total quantity of SPECIAL PRODUCT 1.

The total cost for all SPECIAL PRODUCT 1 ordered will be calculated.

THEN:

For the given order ID, You will add code to search the orders_products table for the total quantity of SPECIAL PRODUCT 2.

The total cost for all SPECIAL PRODUCT 2 ordered will be calculated.

THEN:

The JROX Test system has 2 "Programs" defined.

Program 1 is for SPECIAL PRODUCT #1 and SPECIAL PRODUCT #2 and allows 20% commission

Program 2 is for SPECIAL PRODUCT #2 and allows 20% commission

If the total dollar amount of SPECIAL PRODUCT #1 + SPECIAL PRODUCT #2 is greater than 0 Then

JROX will be sent the total dollar amount of SPECIAL PRODUCT #1 and #2, the order id and the program number variable set to "1"

Example -

echo '<g border="0"

src="[url removed, login to view]'.$TotalAmount.'&trans_id='.$TransID.'&program_id='1'" width="1" height="1">';

THEN:

If the total dollar amount of the remaining products is greater than 0 Then

JROX will be sent the total dollar amount of all remaining products, the order id and the program number variable set to "2"

Remaining Products Total = Total Products Cost - Cost of Special Product #1 + #2

Example -

echo '<g border="0"

src="[url removed, login to view]'.$TotalAmount.'&trans_id='.$TransID.'&program_id='2'" width="1" height="1">';

============================================================

OSCommerce Database Schema for orders_products table (you MUST verify this on the test system)

orders_products

ColumnName DataType

-------------------- --------------

orders_products_id INTEGER(11)

orders_id INTEGER(11)

products_id INTEGER(11)

products_model VARCHAR(12)

products_name VARCHAR(64)

products_price DECIMAL(15,4)

final_price DECIMAL(15,4)

products_tax DECIMAL(7,4)

products_quantity INTEGER(2)

orders_total

ColumnName DataType

-------------------- --------------

orders_total_id INTEGER(10)

orders_id INTEGER(11)

title VARCHAR(255)

text VARCHAR(255)

value DECIMAL(15,4)

class VARCHAR(32)

sort_order INTEGER(11)

This is about 3-4 paragraphs of code

Estimate about 5 hours including testing

An OSCommerce Test System will be provided

A JROX Affiliate Test System will be provided

The modifications are made to 1 module [url removed, login to view]

All code must be commented

Kỹ năng: Bất kì công việc gì, MySQL, PHP

Xem thêm: src program, decimal search, jam, affiliate shopping, integration testing example, shopping cart affiliate program, sale product commission, affiliate program code, add special shipping, php change variable, flat background, variable mysql, affiliate search, schema database mysql, datatype, transaction cost, php mysql product search, affiliate products, per sale affiliate programs, mysql logs, mysql schema, oscommerce product change, sale affiliate, variable search, php affiliate system

Về Bên Thuê:
( 2 nhận xét ) Palm Coast, United States

Mã Dự Án: #1910420

Đã trao cho:

andhotbot

Hi there, I can get it done for you. escrow needed. thanx

$50 USD trong 2 ngày
(337 Đánh Giá)
6.8