<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Bug: Shipping costs (variable rate) not recalculated when cart changed</title>
  <link rel="self" href="https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122933624" />
  <subtitle>Bug: Shipping costs (variable rate) not recalculated when cart changed</subtitle>
  <id>https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122933624</id>
  <updated>2026-04-09T12:19:32Z</updated>
  <dc:date>2026-04-09T12:19:32Z</dc:date>
  <entry>
    <title>RE: RE: Bug: Shipping costs (variable rate) not recalculated when cart changed</title>
    <link rel="alternate" href="https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123173818" />
    <author>
      <name>Marco Nguitragool</name>
    </author>
    <id>https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123173818</id>
    <updated>2025-01-13T16:35:47Z</updated>
    <published>2025-01-10T03:04:01Z</published>
    <summary type="html">&lt;p&gt;Thanks a lot! &#x1f64f; I gave it a short test and it seems to work fine,
  now. &#x1f973; I'll let you know, if a more thorough test still reveals any problem.&lt;/p&gt;
&lt;p&gt;Wish you a great, healthy, successful and fulfilled new year &lt;a href="https://en.wikipedia.org/wiki/Thai_solar_calendar"&gt;2568&lt;/a&gt;!&lt;/p&gt;</summary>
    <dc:creator>Marco Nguitragool</dc:creator>
    <dc:date>2025-01-10T03:04:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Bug: Shipping costs (variable rate) not recalculated when cart changed</title>
    <link rel="alternate" href="https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123082407" />
    <author>
      <name>Jamie Sammons</name>
    </author>
    <id>https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123082407</id>
    <updated>2024-11-18T17:09:56Z</updated>
    <published>2024-11-18T17:09:56Z</published>
    <summary type="html">&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;This should be fixed with
  https://liferay.atlassian.net/browse/LPD-34409 and will be available
  in the next CE quarterly release.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br&gt; ​​​​​​​Jamie&lt;/p&gt;</summary>
    <dc:creator>Jamie Sammons</dc:creator>
    <dc:date>2024-11-18T17:09:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Bug: Shipping costs (variable rate) not recalculated when cart changed</title>
    <link rel="alternate" href="https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123027496" />
    <author>
      <name>Jamie Sammons</name>
    </author>
    <id>https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=123027496</id>
    <updated>2024-10-15T17:10:30Z</updated>
    <published>2024-10-15T17:10:27Z</published>
    <summary type="html">&lt;p&gt;Bug Report Created: https://liferay.atlassian.net/browse/LPD-39418&lt;/p&gt;</summary>
    <dc:creator>Jamie Sammons</dc:creator>
    <dc:date>2024-10-15T17:10:27Z</dc:date>
  </entry>
  <entry>
    <title>Bug: Shipping costs (variable rate) not recalculated when cart changed</title>
    <link rel="alternate" href="https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122933623" />
    <author>
      <name>Marco Nguitragool</name>
    </author>
    <id>https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122933623</id>
    <updated>2024-09-20T16:33:07Z</updated>
    <published>2024-09-13T08:01:55Z</published>
    <summary type="html">&lt;p&gt;
  &lt;u&gt;
    &lt;strong&gt;Short description&lt;/strong&gt;
  &lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;Shipping costs may depend on weight or other conditions. Liferay
  calculates the shipping costs correctly, when performing a checkout,
  but does not recalculate them, if the user aborts the checkout,
  modifies the data and then returns to the checkout. Instead, the
  shipping costs seem to be cached and the cache becomes stale.&lt;/p&gt;
&lt;p&gt;
  &lt;u&gt;
    &lt;strong&gt;How to reproduce&lt;/strong&gt;
  &lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Back-office&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;Configure variable rate shipping costs via Commerce =&amp;gt; Channel
  =&amp;gt; Edit =&amp;gt; General =&amp;gt; Shipping methods.&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_092702-png?imagePreview=1"&gt;
  &lt;br&gt; As you see in the screenshot above, I have disabled the
  "Flat rate" and use only the "Variable rate" shipping-engine.&lt;/p&gt;
&lt;p&gt;There you click "Edit" and you configure multiple options
  (I guess it also works with a single option, but this is the
  configuration I have):&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_093237-png?imagePreview=1"&gt;
  &lt;br&gt; ...and you configure the "Shipping Option Settings" accordingly:&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_093339-png?imagePreview=1"&gt;
  &lt;br&gt; Each of these settings defines a different price and a different
  weight-range. Here's an example:&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_093416-png?imagePreview=1"&gt;
  &lt;br&gt; This means, I have now 3 different shipping options applicable to
  3 different weight-ranges:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;0g-490g =&amp;gt; 52 THB&lt;/li&gt;
  &lt;li&gt;491g-990g =&amp;gt; 82 THB&lt;/li&gt;
  &lt;li&gt;991g-1990g =&amp;gt; 150 THB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of course, your products need to be configured with the correct
  weight. So for example, this piece of chocolate has a weight of 110g:&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_094308-png?imagePreview=1"&gt;
  &lt;br&gt; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Web-shop&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;As a customer, you add said product with quantity 10 to the cart. 10
  * 0.11kg = 1.1 kg. Hence, we expect the delivery costs to be 150 THB.
  Starting a checkout shows exactly this expected result in the
  "Order summary":&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_094905-png?imagePreview=1"&gt;
  &lt;br&gt; Now, you click on the cart icon or the "My Cart" menu
  item and change the quantity to 4. The weight is now 4 * 0.11 kg =
  0.44 kg. We thus expect the delivery costs to drop to 52 THB. So we go
  into the checkout again, continue as a guest, click through the
  process until the order summary:&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_095358-png?imagePreview=1"&gt;
  &lt;br&gt; Now, it shows the delivery costs still to be 150 THB, which is
  wrong, and it does not show the "Method" on the right side, anymore.&lt;/p&gt;
&lt;p&gt;If we delete the products from the cart, i.e. we make the cart
  completely empty. Then re-add the article with quantity 4 and go to
  the checkout, the delivery costs are calculated correctly and the
  "Method" is shown again (with the correct data):&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="218" src="/documents/d/guest/screenshot_20240913_095708-png?imagePreview=1"&gt;
  &lt;br&gt; ​​​​​​​The same bug also appears when I change the prices
  depending on the destination-country. Once, the delivery costs are
  calculated, they are not updated. Even when going back to the
  shipping-address, switching to an address in another country, and then
  go forward to the order summary, again. The old value for the 1st
  country still stays.&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;This is fraud potential! This bug is IMHO urgent!&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;u&gt;
    &lt;strong&gt;Liferay version&lt;/strong&gt;
  &lt;/u&gt;
&lt;/p&gt;
&lt;p&gt;Liferay Community Edition Portal 7.4.3.120 CE GA120 (June 12, 2024)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Marco Nguitragool</dc:creator>
    <dc:date>2024-09-13T08:01:55Z</dc:date>
  </entry>
</feed>
