[Contribution] Ship In Cart
#1
Posted 22 March 2003 - 03:52 PM
#2
Posted 22 March 2003 - 03:56 PM
#3
Posted 22 March 2003 - 03:59 PM
here it is:
http://www.oscommerce.com/community/contributions,1094
#4
Posted 22 March 2003 - 10:01 PM
find answers at wiki.oscommerce.com/top
#5
Posted 23 March 2003 - 09:46 AM
Little update that corrects the display of the shipping options
Upgrade instructions in the install.txt
#6
Posted 23 March 2003 - 12:47 PM
I was looking for such a contribution for a long time.
Well I tried it on my november 2.2 snapshot with no success
It simply showed no options.
Any ideas?
#7
Posted 23 March 2003 - 12:59 PM
Can you send me your files:
/catalog/includes/classes/order.php
/catalog/includes/classes/shipping.php
/catalog/includes/classes/shopping_cart.php
I can have a look at them, but I assume they don't work the same...
Maybe one of the OSC-GURUS (aka Believers) can answer this question.
#8
Posted 23 March 2003 - 02:40 PM
1) It doesn't appear to pick up zone rates unless the person is logged in. I would like to set zone rates to show (and assume it's sending to the store country).
2) I would like the contribution to show only the lowest rate. For example I might have 3 or 4 postage methods, it would be easier for the customer to see only the lowest rate...
I'll work on implementing these and post back if and when I have success. Thanks for this contribution.
#9
Posted 23 March 2003 - 02:41 PM
Quote
So that even though the buyer is not logged in, the software will assume the buyer is from the country the store is located and work out the zone price accordingly.
#10
Posted 23 March 2003 - 04:04 PM
if (!tep_session_is_registered('customer_id')) {
$order->delivery['country']['id']=STORE_COUNTRY;
}
Isn't this enough?
#11
Posted 23 March 2003 - 04:20 PM
Quote
if (!tep_session_is_registered('customer_id')) {
$order->delivery['country']['id']=STORE_COUNTRY;
}
Isn't this enough?
Thats how I read the code, but it does not work. The value of zone rates stays at zero, unless the shopper is logged in (and then it does work).
#12
Posted 23 March 2003 - 04:27 PM
What is the value of STORE_COUNTRY ??
There's even a second piece of code:
if (!tep_session_is_registered('customer_id')) {
$sendto = STORE_COUNTRY;
}else{
$sendto = $customer_default_address_id;
}
In my case it seems to work ok ....
You are sure the country is set in the admin?
#13
Posted 23 March 2003 - 04:28 PM
#14
Posted 23 March 2003 - 04:30 PM
#15
Posted 23 March 2003 - 04:42 PM
Quote
Quote
Quote
#16
Posted 23 March 2003 - 04:45 PM
#17
Posted 23 March 2003 - 04:49 PM
#18
Posted 23 March 2003 - 07:00 PM
Zone rates now working....
:oops: sorry for not checking zone rates...
Please inform me if certain shipping modules are not working....
upgrade instructions in the install.txt
#19
Posted 24 March 2003 - 09:41 AM
* OSC version
* Shipping modules activated in the admin
* output of this piece of code: (put it just before <!-- shipping cost --> in the /catalog/shopping_cart.php file)
<?php
echo '<b> debug start </b><br>'.
'Quotes size='.sizeof($quotes).'<br>'.
'logged in = '.tep_session_is_registered('customer_id').'<br>'.
'cart contents='.$cart->count_contents().'<br>'.
'cart content type='.$cart->get_content_type().'<br>'.
'cart weight='.$cart->show_weight().'<br>'.
'order country id='.$order->delivery['country']['id'].'<br>'.
'order iso code 2='.$order->delivery['country']['iso_code_2'].'<br>'.
'order zone id='.$order->delivery['zone_id'].'<br>'.
'cust default address='.$customer_default_address_id.'<br>'.
'<b> debug end </b><br>';
?>
#20
Posted 24 March 2003 - 09:58 AM
Nice work, thanks.









