Paypal shipping per item..

keeb

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:
http://www.keeb.com/quick.cart

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.

____________________________________________
<?php
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=

=keeb - The boss of the little people=

keeb

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=

=keeb - The boss of the little people=

danetix

No avatar

2006-07-19 19:17

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

idaryl

Avatar: idaryl

2006-10-14 06:46

Yea I want to know too

Wulfgen

src

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 [$]
Test
(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

bomahony

No avatar

2006-10-25 16:16

src:
Thats how i added it.
http://www.hammocks.ie/store

(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
change:

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

to

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.

B

Back to top
about us | contact