Author |
Topic |
|
wamisiu
Starting Member
USA
7 Posts |
Posted - April 13 2006 : 15:51:58
|
I am wanting to have a default affiliate code within my cart. The idea being anyone that goes to the cart that does not have a link providing an affiliate code - a default would be provided.
Does anyone know the correct place to put this code? I am thinking it goes in shopdisplayproducts.asp. Any other thoughts on this? |
|
hk777
Starting Member
Australia
34 Posts |
Posted - April 13 2006 : 16:20:12
|
In file shopcreateorder.asp, just before this line action = request("Cancel")
add the following so it looks like
If getsess("affid")="" then setsess "affid",9 end if action = request("Cancel")
Where 9 is your default id.
http://www.hkprog.com/guide
|
|
|
wamisiu
Starting Member
USA
7 Posts |
Posted - April 13 2006 : 17:26:42
|
I'm assuming HK is Howard? I tried it and it did not work for me. However, you had written some custom code for me about 2 years ago that allowed me to put a number in the Affiliate Mastercommissionrate. This custom code set a discount on an affiliate by affiliate basis.
I'm pasting the notes from an email explaining the logic shopaff.asp looks up affiliate record and finds the discount percent and saves it as session variable When customerprice logic is entered, it sees if there is an affiliate discount and if there is applies it If VP-ASP cannot find a directurl in the affiliate record it assumes the home page
I'm wondering if this custom code may be keeping things from working. Any suggestions?
|
|
|
wamisiu
Starting Member
USA
7 Posts |
Posted - April 13 2006 : 18:01:14
|
The comments in the shopcreateorder.asp indicates its "the last chance to cancel before the order is created."
In my application, I have modified files so that shopdisplay products comes up with a list price, and the customers discount price. My goal is to send someone directly to that page, with the discounts displayed either as a default affiliate or affiate code.
It seems shocreateorder is later, or am I misunderstanding the logic in how these work together? |
|
|
hk777
Starting Member
Australia
34 Posts |
Posted - April 13 2006 : 19:32:38
|
The normal purpose of the affiliate id is simply to store the id so commission can be calculated at the end of the order. The code I suggested is the absolute last place where an affiliate id can be set before the order is stored into the database.
It sounds like you want to use the affiliate id for other purposes. Anything I suggest now would be total guess work on a customized shop. (sorry I do not remember the mod).
It sounds like you want it set before the shopping starts. Any formal customizations need to go through VP-ASP support group.
Howard Kadetz http://www.hkprog.com
|
|
|
wamisiu
Starting Member
USA
7 Posts |
Posted - April 14 2006 : 19:02:41
|
Thanks, I appreciate your help.
I did figure out a workaround in case anyone is interested. I use the Affiliate code like a reseller for where I can assign different discounts to resellers. I display the retail price, and the price each affiliates clients pay on my order page.
I wanted the default so I could send direct clients to a page where they can get a nominal discount.
I've created a link from my main page to shopaff.asp?affid=xxxx. In each affiliate I set a discount in the mastercommission, and set directurl to a page that displays all of my product categories. The products category page is displayed automatically and a client can category. Once a client selects a category, there is a link to shopdisplayproducts.asp?id=xx where xx=the category. It works like a champ so far. I direct my home page and continue shopping to the products page. Works like a champ so far. |
|
|
|
Topic |
|