Paypal shipping per item..


No avatar

2006-04-27 14:13

i have gone thru this forum frontwards and backwards to find a solution.

i have a cart fully functional short of being able to have shipping calculate per item. i can't have paypal do my shipping calculation due to other reasons.

at any rate:

there is my little cart, it does everything it is supposed to do, i have it adding shipping via a courier setting where i manually placed item amounts , to rely on customer honesty is simply not going to be feesible. i found a snippet of code that treewood had conjured up and would really like to know where to place it as it looks like it counts the items in the cart and applies postage.

function countOrderSummary( $iOrder ){
$aData = dbListBasket( $iOrder );
if( isset( $aData ) ){
$iCount = count( $aData );
$fSummary = 0;
// count summary, products in basket
for( $i = 0; $i < $iCount; $i++ ){
$fSummary += tPrice( $aData[$i][3] * $aData[$i][4] );
} // end for
// add shipping cost
$aData = dbThrowOrderExt( $iOrder );
$fSummary = tPrice( $aData[4] + $fSummary );
return $fSummary;
} // end function countOrderSummary

i am using the latest v1.2 of quick cart and i also have plugin manager 2.0 and attributes 2.2 installed, all my php/mysql/os are current and up to date. the cart overall functions perfectly cept for the shipping.

any help would be greatly appreciated.

=keeb - The boss of the little people=


No avatar

2006-04-27 14:15

ps please the cart is not really selling anything yet.. dont order from there.. thank you.. it is a mockup.


=keeb - The boss of the little people=


No avatar

2006-07-19 19:17

keeb did you ever manage to figure out how to get that to work?


Avatar: idaryl

2006-10-14 06:46

Yea I want to know too



No avatar

2006-10-25 02:39

I think one way to do this would be to add various shipping options as Attributes (using Attribute plugin).

You can set up each item with it's own set of attributes (shipping types).

The customer would then choose the shipping when they're viewing the item and selecting the quantity they want.

Wouldn't show up as a line item on the final subtotal in the cart (Delivery Cost = $0), but it is captured in the item price.

I tested this by setting up 2 Shipping attributes: "Ground 19.99", +19.99 and "Express 39.99", +39.99.

Then I set up my products with those two attributes. When I add them to cart it looks like this:

Name Price [$] Quantity Total [$]
(Shipping:Ground $19.99) 59.98 1 59.98
Subtotal 59.98
Delivery Cost 0.00
Total 59.98

This should pass right through to PayPal the same way.

Sure would be nice to have a shipping per item option built in though.

Good luck


No avatar

2006-10-25 16:16

Thats how i added it.

(Please dont order as shop is now live!)

Thing is i ran into a problem with the paypal logo not showing up!

Claps kindly pointed out a small change in code, which i will impart here:
in orders

if( $aData['fCourierPrice'] > 0 ){
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL' );


if( $aData['fCourierPrice'] >= 0 ){
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL' );

The courier price is a constant 0 so this will resolve the image not showing up.


Back to top
about us | contact