Wholesale shipping options
Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=4276
Printed Date: 03-July-2025 at 10:35am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Wholesale shipping options
Posted By: eeversole
Subject: Wholesale shipping options
Date 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.
|
Replies:
Posted By: Brett
Date 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.
|
Posted By: eeversole
Date 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.
|
Posted By: Brett
Date 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.
|
|