Jump to content



Photo
- - - - -

[Contribution] Ship In Cart


  • Please log in to reply
616 replies to this topic

#1   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 22 March 2003 - 15:52

This will show the shipping options and costs in the cart.

#2   Illicious

Illicious
  • Members
  • 455 posts
  • Real Name:Illicious
  • Location:Shaolin of NYC

Posted 22 March 2003 - 15:56

Where is it?

#3   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 22 March 2003 - 15:59

I always create the forum topic first, so that i can put the url to the topic into the install file...

here it is:
http://www.oscommerc...tributions,1094

#4   jchasick

jchasick
  • Members
  • 1,511 posts
  • Real Name:jeff
  • Location:California

Posted 22 March 2003 - 22:01

sounds interesting - will take a look at it - thank you :wink:
Reading is beneficial - Searching is enlightening
find answers at wiki.oscommerce.com/top

#5   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 09:46

Ship 2 Pay v1.1 available for download....

Little update that corrects the display of the shipping options

Upgrade instructions in the install.txt

#6   koko01

koko01
  • Members
  • 16 posts
  • Real Name:koko

Posted 23 March 2003 - 12:47

Hi,

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   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 12:59

I have MS1 ...

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 ONLINE   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,559 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 23 March 2003 - 14:40

I like this contribution a lot. I have two ideas that (I believe) would make it more useful:

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 ONLINE   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,559 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 23 March 2003 - 14:41

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).


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   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 16:04

It should normally already set the country....

if (!tep_session_is_registered('customer_id')) {

      $order->delivery['country']['id']=STORE_COUNTRY;

}

Isn't this enough?

#11 ONLINE   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,559 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 23 March 2003 - 16:20

It should normally already set the country....

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   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 16:27

Are you working with MS1?

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   koko01

koko01
  • Members
  • 16 posts
  • Real Name:koko

Posted 23 March 2003 - 16:28

Where do I send you the files to?

#14   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 16:30

send to the email button that you find under my postings...

#15 ONLINE   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,559 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 23 March 2003 - 16:42

Are you working with MS1?

Yes

What is the value of STORE_COUNTRY ??

222 (Uk- GB)

You are sure the country is set in the admin?

Yes

#16   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 16:45

What is the shipping method that isn't working?

#17 ONLINE   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,559 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 23 March 2003 - 16:49

Zone Rates

#18   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 23 March 2003 - 19:00

Version 1.2 now posted...

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   ednique

ednique
  • Members
  • 111 posts
  • Real Name:Edwin Bekaert
  • Location:Belgium

Posted 24 March 2003 - 09:41

In case it's not working please post the following info:

* 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 ONLINE   burt

burt

    Vanquisher of Demons

  • Community Team
  • 9,559 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 24 March 2003 - 09:58

Zone rates now works. Thanks very much. All I need to do now is do a "cheapest" function..

Nice work, thanks.