Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Resellers referring customers with price breaks


Guest

Recommended Posts

I believe I need the Separate Pricing Per Customer contribution for this, but I thought I'd confirm (as the installation is incredibly long!!) before trying. Also, I believe it's not a 100% fit, so I thought I'd see if anyone has any tips.

 

Here's the situation:

We want to set certain people (and only certain people) up as resellers. This should give them two things: a 30% discount for themselves, and the ability to refer people to the site at discounts of 10%. They can give people a PIN that, when they create an account, makes them eligible for this 10% off all purchases in this account. We'd like the resellers to also be able to see, under their own login, a report of all the sales done with their PIN that they hand out.

 

I'm guessing the last part will have to be done by hand, but I'm curious about the first part. I'm not clear yet with SPPC how people get assigned to these groups - it looks like possibly by putting in a tax ID. I guess this is what I'd have to modify so that it not only checked to see if it's there, but if it's a proper PIN in some sort of table. Is there anything in SPPC equivalent to this, or has anyone done anything similar?

 

Thanks for any advice/suggestions you may have to offer!

Link to comment
Share on other sites

Oh, and I should mention - just to make things interesting, this cart already has Purchase Without Account installed, and it needs to stay for those customers not using PINs. Whee! :-)

Link to comment
Share on other sites

Oh, and I should mention - just to make things interesting, this cart already has Purchase Without Account installed, and it needs to stay for those customers not using PINs. Whee! :-)

 

I managed to get the cart to the point where people have the choice of whether to create an account or not, after a lot of fiddling. I'm still hoping for some guidance as to whether anyone else has tried something like this, and whether SPPC is the rigt contribution. It's just so huge!

 

Thanks.

Link to comment
Share on other sites

  • 4 weeks later...
We want to set certain people (and only certain people) up as resellers. This should give them two things: a 30% discount for themselves, and the ability to refer people to the site at discounts of 10%. They can give people a PIN that, when they create an account, makes them eligible for this 10% off all purchases in this account. We'd like the resellers to also be able to see, under their own login, a report of all the sales done with their PIN that they hand out.

Just thought I'd put a bit of an update here (as well as in my initial thread) for two purposes - to help out others trying to do similar things, and to see if there's any suggestions for the rest of the steps I need to take.

 

I have done the following:

 

- Re-added account creation ability to the site (I was running solely on PWA before)

- Integrated the base SPPC contribution

- Added a group "Resellers" that gets a 30% discount on all products. This will be done manually, as these need to be controlled and PINs assigned.

- Added a group "Pro Customers" that gets a 10% discount on all products.

- Note: the discounts were done by modifying the SQL queries from here.

- Changed references from company_tax_id to PIN. This was done a number of places, although I'm not 100% I've got all of them yet.

- Moved the PIN field from the address_book table into the customers table. This just seems a more consistant place to put it for this purpose, since it's per customer (not per address). Steps for this can be found here.

- Created table customers_pins in the db to hold the valid PINs.

- Adapted create_account.php to check the PIN and automatically add to the "Pro Customers" group if the PIN is there and valid. If invalid, return error; if blank, put in default retail group. I based this off the post here. The changes I made to the referenced code were to add the following code into the error-checking section at the top:

	$pin_flag = false;
if ($pin != '') {
	$query = "select id from " . TABLE_CUSTOMERS_PINS . " where pin = '" . $pin . "'";
	$get_pins_query = tep_db_query($query);
	$get_pins = tep_db_fetch_array($get_pins_query);
}
if ($get_pins['id'] == '') {
	$messageStack->add('create_account', ENTRY_PIN_ERROR);
	$error = true;
}
else {  $pin_flag = true; }

 

Also, when setting up the $sql_data_array, I added:

	if ($pin_flag == true) {
	$sql_data_array['customers_group_id'] = '1';
}

  $sql_data_array['entry_pin'] = $pin;

 

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

Thanks to JanZ for all the great bits of code I referenced above. Still working on the following points:

 

- Need to add back in the ability to login up front (so they can see their discount while shopping), ability to change account, etc... all removed when PWA was initially installed. Should be easy.

- On that note, I may add the contribution to see the regular price and then their discounted price. Show Price List for SPPC? I think?

- Also, it'd be nice to show how much they saved on the final confirmation page. Not sure about that one yet.

- I modified the "How Did You Hear About Us" contrib to be on the order_info.php (to work w/ PWA). Now that I've added account creation back in (in addition to PWA), I'll have to merge those somehow. Also, the PINs collected here could probably count as the source, since they got them from a particular person. Ugh.

- Create reports that show the sales being done under accounts with each PIN. Have master reports on all PINs for the admin, and inidividual reports for each pro about their PIN only.

- Link the ability to see these individual reports to the pros' regular account logins.

- Oh, and I believe there's something coming that will give more control over attribute pricing? I'll have to keep an eye on that, since everything's supposed to be at a 10% discount, but some of my products have attributes that add to the base cost, and 10% is not getting taken off those charges.

 

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

 

Thanks again for all the help so far, and any suggestions you may have for the rest of the project. I've also posted this in the SPPC thread, so there may be additional info there.

Link to comment
Share on other sites

  • 4 weeks later...
Thanks to JanZ for all the great bits of code I referenced above. Still working on the following points:

 

- Need to add back in the ability to login up front (so they can see their discount while shopping), ability to change account, etc... all removed when PWA was initially installed. Should be easy.

- On that note, I may add the contribution to see the regular price and then their discounted price. Show Price List for SPPC? I think?

- Also, it'd be nice to show how much they saved on the final confirmation page. Not sure about that one yet.

- I modified the "How Did You Hear About Us" contrib to be on the order_info.php (to work w/ PWA). Now that I've added account creation back in (in addition to PWA), I'll have to merge those somehow. Also, the PINs collected here could probably count as the source, since they got them from a particular person. Ugh.

- Create reports that show the sales being done under accounts with each PIN. Have master reports on all PINs for the admin, and inidividual reports for each pro about their PIN only.

- Link the ability to see these individual reports to the pros' regular account logins.

- Oh, and I believe there's something coming that will give more control over attribute pricing? I'll have to keep an eye on that, since everything's supposed to be at a 10% discount, but some of my products have attributes that add to the base cost, and 10% is not getting taken off those charges.

 

More updating - I added the ability to login/logout on all pages back, and most importantly, the report for sales done under the pro's PIN is complete and linked to their normal "My Account" page. Whew! Feel free to contact me here if you want more info for doing something similar.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...