Jump to content
ednique

[Contribution] Ship In Cart

Recommended Posts

 

Uploaded:

Ship In Cart Phoenix 5.4

Compatibility:
  OsC CE Phoenix 1.0.5.1+
  Tested with Phoenix 1.0.7.14
  PHP: 7.0 - 7.4
 
Changes Vers. 5.4:
  - Added state index for not logged in users to be compatible with some shipping modules which use it.
  - tested with Phoenix 1.0.7.14 final release.

 

Share this post


Link to post
Share on other sites

Hi @raiwa,

thanks for the update.

We have 19% tax on shipping and some of our products are sold with 7%. 

As long as there are only 7% products in the shopping cart I get:

Undefined index: enthaltene MwSt. 19% in /phoenix/includes/modules/order_total/ot_shipping.php on line 56.

Best regards

Christoph

Share this post


Link to post
Share on other sites
5 minutes ago, beerbee said:

Hi @raiwa,

thanks for the update.

We have 19% tax on shipping and some of our products are sold with 7%. 

As long as there are only 7% products in the shopping cart I get:

Undefined index: enthaltene MwSt. 19% in /phoenix/includes/modules/order_total/ot_shipping.php on line 56.

Best regards

Christoph

I know. It happens only if user is not logged in. Didn't come around until know. I'll have a look for the next update. For now, switch error reporting off as it should be for a live store 😉

Share this post


Link to post
Share on other sites

No, I'm far from live (sadly), so I'll keep it on - it was just to let you know, thanks!

BR C

Share this post


Link to post
Share on other sites

Hi, 

Followed all instruction to update from 5.2 to 5.3 on Phoenix 1.0.7.14, but <Admin >Modules > Content > Shipping estimator[shopping_cart]> still showing current version as 5.2. 

everything else seems to be working fine. Thanks

Edited by zeeshop

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Hello Rainer.

I have installed your contribution and it seems to work just fine except for a bizarre behaviour (at least on one of my sites) of the shipping estimator module. Please take a look:

image.thumb.png.7056fcf808ef4d71ec9be6fbe8991ecd.png

on a multi-language website, the actual weight of the product is not being considered whenever a language different than English is beind selected.

Instead, it looks as though the wrong weight is taken directly from a (wrong) Kgs-to-lbs conversion which is somehow taking place on the English language page:

image.thumb.png.80769ec62f1f45140c0f736fbb66b39f.png

The wierdest thing is that the estimated shipping amount is being calculated according to the values of the specified country/zone rate, however, after double checking those values, I have found that the EUR164/USD199.52 amount refers to a 6Kg weight, instead of the actual 3.5Kg weight of the purchased product.  

Shipping weight unit field value inside the Shipping Estimator module has been set to Kilograms on admin side, then again, on shop side it shows lbs instead of kgs on the English page and a wrong weight in kgs on the page of any other available language (Spanish in the above example).

Any idea about what is causing the issue and how to solve it? 

Thank you

Share this post


Link to post
Share on other sites

Hello @mendoh,

The difference in the order weight is due to the following:
- the shipping estimator shows in Prodcuts quantity 3.5 kg the total net weight of the product in the shopping cart
- the shipping module shows the total order weight adding the
Package Tare weight and Larger packages - percentage increase, like established in: Admin : Configuration : Shipping /Packaging

The store does not recalculate weight to different units. It uses and shows always the same value entered as products weight.

The units showing are defined in the shipping estimator module for the unit shown in Prodcuts quantity 3.5 kg

The units shown in the shipping module are defined in each language file. That's why it shows kg in spanish, but lbls in english. It has nothing to do with weight conversion.
You have to use the same unit everywhere and chang it in the english language file to kg (if your product weight is intended to be in kg)

Share this post


Link to post
Share on other sites
On 2/8/2021 at 10:56 AM, raiwa said:

The difference in the order weight is due to the following:

Rainer, thanks a lot!

Your explanations had me got it straight. 

Regarding changing from lbs to kg: I could find no weight unit at all inside the English language file, while the only file where I could find a "lbs" indication to change to "kgs" was includes/modules/content/shopping_cart/cm_sc_shipping.php am I right?

Share this post


Link to post
Share on other sites

It's in: includes/languages/english/modules/shipping/zones.php:

const MODULE_SHIPPING_ZONES_TEXT_WAY = 'Shipping to %s : %d lb(s)';

 

Share this post


Link to post
Share on other sites
5 minutes ago, raiwa said:

It's in: includes/languages/english/modules/shipping/zones.php:

Got it!

Thanks again!

Share this post


Link to post
Share on other sites

Hi Rainer,

there seems to have something from two page  _TWOPAGE_ checkout found its way into cm_sc_shipping.php, line 106 (116 too)

            $order->delivery = ['postcode' => ($_POST['zip_code'] ?? MODULE_CONTENT_SC_TWOPAGE_SHIPPING_DEFAULT_ZIP),

Best regards

Christoph

Share this post


Link to post
Share on other sites

In the hopes of not to be too much of a bore 😉, I get an undefined error regarding tax on shipping (19%) in cm_sc_order_:total.php - I tried something, will pm for the safety of the  community.

BR  C

Edited by beerbee

Share this post


Link to post
Share on other sites
2 hours ago, beerbee said:

there seems to have something from two page  _TWOPAGE_ checkout found its way into cm_sc_shipping.php, line 106 (116 too)


            $order->delivery = ['postcode' => ($_POST['zip_code'] ?? MODULE_CONTENT_SC_TWOPAGE_SHIPPING_DEFAULT_ZIP),

 

Hotfix for now until update:

Change all instances of:

MODULE_CONTENT_SC_TWOPAGE_SHIPPING_DEFAULT_ZIP

to:

MODULE_CONTENT_SC_SHIPPING_DEFAULT_ZIP

 

1 hour ago, beerbee said:

In the hopes of not to be too much of a bore 😉, I get an undefined error regarding tax on shipping (19%) in cm_sc_order_:total.php - I tried something, will pm for the safety of the  community.

I believe this is a core issue.

Share this post


Link to post
Share on other sites
On 2/24/2021 at 3:02 PM, beerbee said:

In the hopes of not to be too much of a bore 😉, I get an undefined error regarding tax on shipping (19%) in cm_sc_order_:total.php - I tried something, will pm for the safety of the  community.

BR  C

 

On 1/28/2021 at 3:43 PM, beerbee said:

Hi @raiwa,

thanks for the update.

We have 19% tax on shipping and some of our products are sold with 7%. 

As long as there are only 7% products in the shopping cart I get:

Undefined index: enthaltene MwSt. 19% in /phoenix/includes/modules/order_total/ot_shipping.php on line 56.

Best regards

Christoph

It seems this got fixed in the 1.0.7.16 core update

Share this post


Link to post
Share on other sites

Yes I know, this fix is already implemented on my install. 

This shows up :

Notice: Undefined index: enthaltene MwSt. 7% in /xxx/phoenix/includes/modules/content/shopping_cart/cm_sc_order_total.php on line 74

under the  following circumstances: I'm  not logged in, have free shipping because order amount is above level, and have products with 19 and 7 tax in the cart, If I log in all good.

I noticed if mixed it always the last products thats added tax, can be 19 too.

I have tried to add the fix from core there please check PM the third one seems to fix both ways but I know my limitations...

Best regards

Christoph

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×