Checkout not working when shop has too many shipping options

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
My Belgian customer has a nopCommerce 4.50.4 webshop.
She has many different shipment options for Belgium.

When nopCommerce tries to do /estimateshipping , or when it does /Checkout/OpcSaveBilling it inserts a database row into the GenericAttribute table.
This value has a limit of 4000 characters ( nvarchar(4000) ) in the database.

However, the value being inserted is XML and contains all shipping options for a given country (Belgium in this case), but also contains more info like the full description of every option.
Which, in the case of my customer results in a 4700 character string.

Insert fails because the value is too long, and checkout resets to the shopping basket screen... which means Belgian customers can no longer checkout...
1 year ago
What shipping plugin are you using ?
Why is there so many shipping options ?
It seems you would also be making it too hard for the customer to choose if there is a lot of options
1 year ago
She is using the "Manual (Fixed or By Weight and By Total)" shipment provider.

It doesn't seem a good idea (to me in any case) to try and store XML in a database field without any check on size.

Why so many options?
That's really not up to me, but they all seem "typically Belgian".
Most of them also have multiple weight ranges defined. And some have a very long description.

This is the XML that is being stored:

<?xml version="1.0" encoding="utf-16"?>
<ArrayOfShippingOption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>0.00</Rate>
    <Name>Collect and Go</Name>
    <Description>Pick up your items in Ronse after 18.00 h</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>14.35</Rate>
    <Name>Bpost - envelope - International Prior</Name>
    <Description>International priority mail via the Belgian Postal Services</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>7.80</Rate>
    <Name>Parcel Post Bpost Economy</Name>
    <Description>National "24 h" or international "Economy" parcel service by Bpost, without Trace &amp; Track, without compensation</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>9.15</Rate>
    <Name>Secur - insured Bpost Parcel</Name>
    <Description>Insured parcel by the courier service of the Belgian post office</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>5.50</Rate>
    <Name>DPD - parcel service</Name>
    <Description>Delivered to a DPD pickup point</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>0.00</Rate>
    <Name>ORDER for 99 Euros without discount and receive FREE shipping</Name>
    <Description>You order over 99 Euros without discount and receive free delivery to :
- Belgium/the Netherlands/Germany :  a DPD or Mondial Relay pickup point
- France/Luxembourg : a Mondial Relay  pickup point
- does not apply on orders to other countries
- does not apply on orders of Modern Classic Designs</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>4.17</Rate>
    <Name>Bpost - envelope - Belgium - Non Prior</Name>
    <Description>Non-priority mail via the Belgian Postal Services, delivery in Belgium within three business days
</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>6.51</Rate>
    <Name>Bpost - envelope - Belgium - Prior</Name>
    <Description>Priority mail via the Belgian Postal Services, delivery in Belgium on the next business day</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>72.40</Rate>
    <Name>Parcel Post Bpost Standard</Name>
    <Description>The international "Standard" parcel service by Bpost with Trace &amp; Track, but without compensation</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
  <ShippingOption>
    <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>
    <Rate>5.00</Rate>
    <Name>Bpost - parcel service</Name>
    <Description>Delivered to a Bpost pickup point</Description>
    <TransitDays xsi:nil="true" />
    <IsPickupInStore>false</IsPickupInStore>
    <DisplayOrder xsi:nil="true" />
  </ShippingOption>
</ArrayOfShippingOption>
1 year ago
krisgarrein wrote:
...the GenericAttribute table.
This value has a limit of 4000 characters ( nvarchar(4000) ) in the database....

In the standard 4.50, it's
   [Value] [nvarchar](max)

Maybe you did an 'upgrade' and the field size did not get changed?
In any case, I don't think it would have negative impact if you do:
ALTER TABLE [GenericAttribute ] ALTER COLUMN [Value] nvarchar(max)
1 year ago
Her nopCommerce has been upgraded for years.
So if the update script was incorrect, then it is possible that the database field is not as it should.

I'll check.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.