Wholesale shipping options |
Post Reply |
Author | |
eeversole
Newbie Joined: 14-May-2009 Location: Lawrence, KS Status: Offline Points: 0 |
Post Options
Thanks(0)
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. |
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
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 |
|
eeversole
Newbie Joined: 14-May-2009 Location: Lawrence, KS Status: Offline Points: 0 |
Post Options
Thanks(0)
|
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. |
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
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.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |