ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Wholesale shipping options
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Wholesale shipping options

 Post Reply Post Reply
Author
Message
eeversole View Drop Down
Newbie
Newbie


Joined: 14-May-2009
Location: Lawrence, KS
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote eeversole Quote  Post ReplyReply Direct Link To This Post Topic: Wholesale shipping options
    Posted: 26-January-2011 at 3:22pm
Hello,

We are needing to setup separate shipping options for our Retail and Wholesale customers.  I have searched this forum and have seen the question asked but no real solution offered as of yet.  It is very important for us to get this setup.

If anyone has any ideas on how this might be accomplished I would really appreciate it.

Thank you.
Back to Top
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Posted: 26-January-2011 at 4:20pm
You'll probably want to edit this page: opc_chooseShpmnt.zip and add a few if statements to determine whether the customer is retail or wholesale. This is he page which displays the shipping options.

*edit*

I realize this isn't a "real solution". The reason you're having trouble finding one is that this is probably a bit of work to do. Maybe you should contact one of the accredited developers on the EarlyImpact website. Otherwise, if you're handy with ASP and ProductCart, you should be able to do this pretty easily if you start at opc_chooseShpmnt.zip.

I'd suggest starting near line 507. I'll take a look at this some time in the future if I get time.

Edited by Brett - 26-January-2011 at 4:23pm
Back to Top
eeversole View Drop Down
Newbie
Newbie


Joined: 14-May-2009
Location: Lawrence, KS
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote eeversole Quote  Post ReplyReply Direct Link To This Post Posted: 26-January-2011 at 10:00pm
I was able to find a work around for this.  In my case, I was looking to show separate flat rate shipping amounts based on order amount for our Retail and Wholesale customers.  What I first did was create two new fields in the FlatShipTypeRules table of the database. I named the first “quantityFromWholesale” and the second “quantityToWholesale”.  I then entered my From and To price for my Wholesale customers in those fields as well as my Shipping Price for that scenario.

I then edited the ShipRates.asp file as follows (adding an IF THEN statement for customerType).

I replaced the following code:

If len(VarWQP)>0 Then
    
      select case VarWQP
      case "W"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" &intCustomShipWeight& " AND quantityFrom<=" &intCustomShipWeight
      case "Q"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" &pCartShipQuantity & " AND quantityFrom<=" & pCartShipQuantity
      case "P"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" & pShipSubTotal & " AND quantityFrom<=" & pShipSubTotal
      case "O"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" & pShipSubTotal & " AND quantityFrom<=" & pShipSubTotal
      case "I"
          if pCartShipQuantity=1 then
              pCartShipQuantity2=2
          else
              pCartShipQuantity2=pCartShipQuantity
          end if
          mySQL2="SELECT shippingPrice, quantityTo FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityFrom<=" & pCartShipQuantity2
      end select
   
   
WITH


If len(VarWQP)>0 Then
   
     if session("customerType")=1 then
     
      select case VarWQP
      case "W"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" &intCustomShipWeight& " AND quantityFrom<=" &intCustomShipWeight
      case "Q"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" &pCartShipQuantity & " AND quantityFrom<=" & pCartShipQuantity
      case "P"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityToWholesale>=" & pShipSubTotal & " AND quantityFromWholesale<=" & pShipSubTotal
      case "O"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" & pShipSubTotal & " AND quantityFrom<=" & pShipSubTotal
      case "I"
          if pCartShipQuantity=1 then
              pCartShipQuantity2=2
          else
              pCartShipQuantity2=pCartShipQuantity
          end if
          mySQL2="SELECT shippingPrice, quantityTo FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityFrom<=" & pCartShipQuantity2
      end select

     else
     
           select case VarWQP
      case "W"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" &intCustomShipWeight& " AND quantityFrom<=" &intCustomShipWeight
      case "Q"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" &pCartShipQuantity & " AND quantityFrom<=" & pCartShipQuantity
      case "P"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" & pShipSubTotal & " AND quantityFrom<=" & pShipSubTotal
      case "O"
          mySQL2="SELECT shippingPrice FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityTo>=" & pShipSubTotal & " AND quantityFrom<=" & pShipSubTotal
      case "I"
          if pCartShipQuantity=1 then
              pCartShipQuantity2=2
          else
              pCartShipQuantity2=pCartShipQuantity
          end if
          mySQL2="SELECT shippingPrice, quantityTo FROM FlatShipTypeRules WHERE idFlatShipType="& idTemp &" AND quantityFrom<=" & pCartShipQuantity2
      end select
     
      end if

That's it.
Back to Top
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Posted: 27-January-2011 at 6:00am
Ah ya, I figured it would be an if statement with a second set of database fields. I'm glad you figured out the solution! I've never really used Wholesale customers so I didn't really know where to begin.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.