I want shipping to be $7.99

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
I want shipping to be $7.99 - but it keeps defaulting to $8.00. Any easy fix for this? Thanks
15 years ago
Please see http://forums.nopcommerce.com/forums/default.aspx?g=posts&m=1074&#1074

Not sure if this was part of the design but currently tables only allow for whole numbers to be stored. Is a quick fix (as issue only at db level).
15 years ago
Hi,  we looked at the link with the decimal code link.  I need to find out what Page or Pages to change the code in.  Please let me know all.

thanks
15 years ago
Hi, you do not need to change any code.

You need to change the necessary table and stored procedures. So if you are using the Shipping By Total shipping Rate Computation method to apply your fixed price shipping, then you will need to change the ShippingChargeAmount field/parameters in the "Nop_ShippingByTotal" table and the Update and Insert stored procedures i.e. Nop_ShippingByTotalUpdate and Nop_ShippingByTotalInsert.

If you were using one of the other computation methods then you will need to the same - just look for the relevant table and stored procedures - they all follow the same naming pattern.

Hope this helps,

Ben
15 years ago
Hi, we are having difficultie saving the changes to the stored procedures? How do we save? Thanks
15 years ago
We figured this one out. Shipping is now at $7.99 default. thanks
15 years ago
Here's the code:


1. Updated the following tables [Nop_ShippingByTotal], [dbo].[Nop_ShippingByWeightAndCountry], [dbo].[Nop_ShippingByWeight]. Datatype of [From], [To], [ShippingChargePercentage], [ShippingChargeAmount] columns was changed from decimal(18, 0) to decimal(18, 2)

ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [From] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [To] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [ShippingChargePercentage] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByTotal]
ALTER COLUMN [ShippingChargeAmount] decimal(18, 2) NOT NULL




ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [From] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [To] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [ShippingChargePercentage] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByWeightAndCountry]
ALTER COLUMN [ShippingChargeAmount] decimal(18, 2) NOT NULL




ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [From] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [To] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [ShippingChargePercentage] decimal(18, 2) NOT NULL

ALTER TABLE [dbo].[Nop_ShippingByWeight]
ALTER COLUMN [ShippingChargeAmount] decimal(18, 2) NOT NULL



10. Updated the following stored procedures Nop_ShippingByTotalInsert, Nop_ShippingByTotalUpdate, Nop_ShippingByWeightAndCountryInsert, Nop_ShippingByWeightAndCountryUpdate, Nop_ShippingByWeightInsert, Nop_ShippingByWeightUpdate.


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByTotalInsert]
(
  @ShippingByTotalID int = NULL output,
  @ShippingMethodID int,
  @From decimal(18, 0),
  @To decimal(18, 0),
  @UsePercentage bit,
  @ShippingChargePercentage decimal(18, 0),
  @ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
  INSERT
  INTO [Nop_ShippingByTotal]
  (
    ShippingMethodID,
    [From],
    [To],
    UsePercentage,
    ShippingChargePercentage,
    ShippingChargeAmount
  )
  VALUES
  (
    @ShippingMethodID,
    @From,
    @To,
    @UsePercentage,
    @ShippingChargePercentage,
    @ShippingChargeAmount
  )

  set @ShippingByTotalID=@@identity
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByTotalUpdate]
(
  @ShippingByTotalID int,
  @ShippingMethodID int,
  @From decimal(18, 0),
  @To decimal(18, 0),
  @UsePercentage bit,
  @ShippingChargePercentage decimal(18, 0),
  @ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
  UPDATE [Nop_ShippingByTotal]
  SET
    ShippingMethodID=@ShippingMethodID,
    [From]=@From,
    [To]=@To,
    UsePercentage=@UsePercentage,
    ShippingChargePercentage=@ShippingChargePercentage,
    ShippingChargeAmount=@ShippingChargeAmount
  WHERE
    ShippingByTotalID = @ShippingByTotalID
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightAndCountryInsert]
(
  @ShippingByWeightAndCountryID int = NULL output,
  @ShippingMethodID int,
  @CountryID int,
  @From decimal(18, 0),
  @To decimal(18, 0),
  @UsePercentage bit,
  @ShippingChargePercentage decimal(18, 0),
  @ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
  INSERT
  INTO [Nop_ShippingByWeightAndCountry]
  (
    ShippingMethodID,
    CountryID,
    [From],
    [To],
    UsePercentage,
    ShippingChargePercentage,
    ShippingChargeAmount
  )
  VALUES
  (
    @ShippingMethodID,
    @CountryID,
    @From,
    @To,
    @UsePercentage,
    @ShippingChargePercentage,
    @ShippingChargeAmount
  )

  set @ShippingByWeightAndCountryID=@@identity
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightAndCountryUpdate]
(
  @ShippingByWeightAndCountryID int,
  @ShippingMethodID int,
  @CountryID int,
  @From decimal(18, 0),
  @To decimal(18, 0),
  @UsePercentage bit,
  @ShippingChargePercentage decimal(18, 0),
  @ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
  UPDATE [Nop_ShippingByWeightAndCountry]
  SET
    ShippingMethodID=@ShippingMethodID,
    CountryID=@CountryID,
    [From]=@From,
    [To]=@To,
    UsePercentage=@UsePercentage,
    ShippingChargePercentage=@ShippingChargePercentage,
    ShippingChargeAmount=@ShippingChargeAmount
  WHERE
    ShippingByWeightAndCountryID = @ShippingByWeightAndCountryID
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightInsert]
(
  @ShippingByWeightID int = NULL output,
  @ShippingMethodID int,
  @From decimal(18, 0),
  @To decimal(18, 0),
  @UsePercentage bit,
  @ShippingChargePercentage decimal(18, 0),
  @ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
  INSERT
  INTO [Nop_ShippingByWeight]
  (
    ShippingMethodID,
    [From],
    [To],
    UsePercentage,
    ShippingChargePercentage,
    ShippingChargeAmount
  )
  VALUES
  (
    @ShippingMethodID,
    @From,
    @To,
    @UsePercentage,
    @ShippingChargePercentage,
    @ShippingChargeAmount
  )

  set @ShippingByWeightID=@@identity
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Nop_ShippingByWeightUpdate]
(
  @ShippingByWeightID int,
  @ShippingMethodID int,
  @From decimal(18, 0),
  @To decimal(18, 0),
  @UsePercentage bit,
  @ShippingChargePercentage decimal(18, 0),
  @ShippingChargeAmount decimal(18, 0)
)
AS
BEGIN
  UPDATE [Nop_ShippingByWeight]
  SET
    ShippingMethodID=@ShippingMethodID,
    [From]=@From,
    [To]=@To,
    UsePercentage=@UsePercentage,
    ShippingChargePercentage=@ShippingChargePercentage,
    ShippingChargeAmount=@ShippingChargeAmount
  WHERE
    ShippingByWeightID = @ShippingByWeightID
END
GO
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.