Forums / Bug Reports / no shipping available after login

no shipping available after login

Locked

Views: 2,993

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
7 Feb 2007, 3:02 PM
#1
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

no shipping available after login

Hello,

There is a bug on my shop when the user adds something to the cart, then logs in and checkout. At this time, there is no shipping option available.

The same problem occurs when a logged user with items in cart logs out then logs in.

However everything is fine if user logs in BEFORE adding items to cart or if user deletes everything from cart then add new items.

I would have debugged this on my local machine, but I cannot reproduce it here. It happens only on the real server.

Searched the forum, but found nothing related.

Any idea ?

Thank you.

7 Feb 2007, 3:16 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: no shipping available after login

Post your version, your server OS, and other relavent criteria

Zen-Venom Get Bitten

7 Feb 2007, 3:37 PM
#3
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

Zen cart 1.3.7
Server: Linux 2.6.18_IMU-131 #1 SMP Tue Sep 26 19:08:57 CEST 2006 i686
Database: MySQL 4.1.20-max-log
Apache Release 10336100
Apache API Version 19990320

Thank you for helping.

7 Feb 2007, 3:47 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: no shipping available after login

At this time, there is no shipping option available.

What shipping modules do you have turned on?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

7 Feb 2007, 3:58 PM
#5
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

Kim:

What shipping modules do you have turned on?
Only one: zones
I tried to add the flat module, but still no one will show.

By the way, are there any tricks to help debugging ? I'm currently adding echo() troughout the code to try figuring out what's happening.

Thank you.

7 Feb 2007, 4:30 PM
#6
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

There is something in zen_get_shipping_enabled() that returns false.

I continue to investigate why. but I suspect the cart in the session is not correctly restored after loggin.

Few more details on the product that's in the cart.

Its a weightless product (software). It has an option for sending the CD-ROM which add 0.15 kg and $10 to the product. The additional weight normally triggers the shipping modules.

7 Feb 2007, 4:56 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: no shipping available after login

If you have 0 weight meaning Free Shipping or if it does not mean Free Shipping you do need to configure that in the Shipping/Packaging ...

If 0 weight means Free shipping or using Always Free Shipping on any product you need to have the Shipping Module Free shipping freeshipper installed ...

Note: Software if you mean a Download should NOT be marked as Virtual or Always Free Shipping ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Feb 2007, 5:15 PM
#8
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

The product is a software that can be downloaded (it has a single radio button attribute with the file). It has another check box attribute to select if the CD-Rom should be sent. That attribute adds 0.1 kg and a small amount.

The product is not free, not virtual, no free shipping.

But remember, the BUG here is not the configuration of a product. Everything is working as expected when user does everything being logged in. The BUG is when there is something in the cart, user can checkout and select shipping method, the user logs off, logs in and checkout. The cart is restored, but now there is no shipping anymore.

7 Feb 2007, 5:17 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: no shipping available after login

Downloads do not have Shipping Options ... when correctly configured ...

Have you an URL to this Product that we can see?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Feb 2007, 6:00 PM
#10
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

Downloads do not have Shipping Options ... when correctly configured ...

The product does not have shipping option until you select the "send me the CD-ROM" option which has a weight, thus enabling shipping option.

Have you an URL to this Product that we can see?
Yes. Sending it as PM.

Thank you.

7 Feb 2007, 11:20 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: no shipping available after login

Is this an upgrade?

What version was this?

How did you do the upgrade?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Feb 2007, 12:52 AM
#12
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

Ajeh:

Is this an upgrade?

What version was this?

How did you do the upgrade?
No, clean install from 1.3.7 zip

I suspect there is some code to be reviewed in includes\classes\shopping_cart.php

at line 670, there is this code in the loop for all attributes:

 
          $adjust_downloads ++;
 

Then this var is used around line 725 to alter free_shipping_price and free_shipping_item, BUT ONLY IF $adjust_downloads equals 1. That means the order of the option has an influence on the calculation. I don't understand if there is a good reason for this. I don't know if you are a zen cart code guru, but my guess is there is something to fix here. It looks like temporary debugging code that has not been cleaned. Even indentation is broken:

 
// adjust for downloads
// adjust products price
  $check_attribute = $attribute_price->fields['products_attributes_id'];
  $sql = "select *
                    from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . "
                    where products_attributes_id = '" . $check_attribute . "'";
  $check_download = $db->Execute($sql);
  if ($check_download->RecordCount()) {
// do not count download as free when set to product/download combo
    if ($adjust_downloads == 1 and $product->fields['product_is_always_free_shipping'] != 2) {
      $this->free_shipping_price += zen_add_tax($products_price, $products_tax) * $qty;
      $this->free_shipping_item += $qty;
    }
// adjust for attributes price
    $this->free_shipping_price += $qty * zen_add_tax( ($new_attributes_price), $products_tax);
//die('I SEE B ' . $this->free_shipping_price);
  }
//  echo 'I SEE ' . $this->total . ' vs ' . $this->free_shipping_price . ' items: ' . $this->free_shipping_item. '<br>';
 

Could someone (with a good understanding of zen cart internals) have a look on this code and see if it really does what was intended ?

Thank you.

8 Feb 2007, 12:57 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: no shipping available after login

The Downloads are managed based on being a normal Product ...

The are NOT Virtual and they are NOT Always Free Shipping ...

When a Product is both a Download and a Physical Product you should mark it as Special Combo ...

Your's is setup as Download or Download with CD ...

The better way to handle that is to make it so the Download does not have weight and the CD does have weight ...

I think you have weight on the Product itself ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Feb 2007, 1:31 AM
#14
moktar avatar

moktar

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

Re: no shipping available after login

Ajeh:

The Downloads are managed based on being a normal Product ...

The are NOT Virtual and they are NOT Always Free Shipping ...

I want the download to be always available, even for people who order the CD.

Ajeh:

When a Product is both a Download and a Physical Product you should mark it as Special Combo ...
Why ? I understand (and tested) that this option only forces the shipping address and method selection for orders with no weight. I don't need to force the shipping selection if there is nothing to ship.

Ajeh:

Your's is setup as Download or Download with CD ...

The better way to handle that is to make it so the Download does not have weight and the CD does have weight ...

I think you have weight on the Product itself ...
That is exactly what I did (the product has no weight and the attribute has).

From my previous post, we can see that the position of the attribute in the list is crucial for the calculation and this is probably the issue to check by a zen cart programmer.

Now I found out there is no problem when the CD-ROM option is the first attribute. I will live with that for now (and write it somewhere in red that attributes must be sorted).

Nevertheless, this is probably the bug to fix: the shipping part of the checkout for a weightless product will only be triggered if its attribute with weight is the first one.

8 Feb 2007, 1:49 AM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: no shipping available after login

I am the Zen Cart coder for this ...

I will have to see if you are yet another exception to the rule ...

There is a special setting for Combo on a Product where a Product is both a download and a physical product ...

There is a setting where the Product can be either a Download or a Physical Product ...

There is a setting where the Product can be a Download only ...

I have to see if you just have a setting incorrect on the weights, attribute settings, etc. ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!