Shipping By total for 2.65 installation error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anos atrás
I tried to install this plugin and get this error:

The model backing the 'ShippingByTotalObjectContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).


Anyone know what I need to do? I'm running 2.65 and have downloaded that plugin version 1.08 which is supposed to be compatible with 2.65.

Need this for the shipping to work.

Thanks.
11 anos atrás
update to this:

I read a bit more and there seemed to be opinions that the DB for some reason was different to what the plugin was expecting. There was a ShippingBytotal table and the columns in it seemed to lack some that the plugin was looking for. Namely:

CountryName
StateProvinceName
ShippingMethodName


so I added those to the DB, removed the plugin (couldn't uninstall it as it gave me the same error as when trying to configure it). Deleted the files from plugin dir, reloaded plugins, uploaded files, reloaded plugins again. tried to configure the plugin aaaaaand.....

Same error again.
11 anos atrás
The fields:
  CountryName
  StateProvinceName
  ShippingMethodName
don't need to be added to the ShippingByTotal table.

To get rid of the error, the database initializer needs to be set to null in a StartupTask. A class for this was added to 1.09 (for nopCommerce 2.70 on .NET 4.5), but was not needed at the time 1.08 was released (10 months ago). Just tested (1.08), and I still don't see the error on a test install of nopCommerce 2.65. When the plugin was updated for nopCommerce 2.70 (version 1.09) the error did occur and the class EfStartUpTask was then added.

EfStartUpTask.cs from 1.09:
http://nopshippingbytotal.codeplex.com/SourceControl/changeset/view/2d9eeb27d1ac#Nop.Plugin.Shipping.ByTotal/Data/EfStartUpTask.cs

If you can recompile the plugin, you can fix the error by adding the EfStartUpTask class to the plugin, recompiling it, and updating the assembly (Nop.Plugin.Shipping.ByTotal.dll) on your web server.

---

If you can't compile the plugin, I've created an updated version of 1.08 for nopCommerce 2.65 with the EfStartUpTask class added (version updated to 1.08.1):

Shipping.ByTotal 1.08.1 compiled:
http://www.mediafire.com/download/ehm1k53rrucx93s/Shipping.ByTotal_1.08.1.zip

Shipping.ByTotal 1.08.1 source:
http://www.mediafire.com/download/aehdrml3sm97gd0/Nop.Plugin.Shipping.ByTotal_1.08.1.zip

To manually uninstall 1.08:
   delete the Shipping.ByTotal folder from \Plugins\
   delete the ShippingByTotal table from your database
   edit App_Data\InstalledPlugins.txt, delete the "Shipping.ByTotal" entry, and save the file
   click 'Reload list of plugins' on Admin > Configuration > Plugins
   Entry for 'Shipping by total' should be gone.
  
Install 1.08.1:
   copy Shipping.ByTotal from Shipping.ByTotal_1.08.1.zip archive to \Plugins\
   click 'Reload list of plugins' on Admin > Configuration > Plugins
   click 'Install' for 'Shipping by total' entry.
   after install, click Configure link.
   make the plugin active at Admin > Configuration > Shipping > Shipping rate computation methods (note that only one offline shipping rate computation method should be active)

Version 1.08.1 should fix the error, but I can't verify it as I don't experience the error with 1.08.

.
11 anos atrás
Excellent comprehensive reply, just as I was starting to think I'd be stuck figuring this one out myself.

I followed your clear instructions, used the nicely precompiled file you provided and everything worked as expected. Thanks again, helped solve a problem I really thought was going to stump me for days.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.