Miva HeLp! E-commerce for the rest of us.
E-commerce for the rest of us. 

one.gif (80 bytes)
Click Here for information on the East Coast Miva User Group meetings
one.gif (80 bytes)
one.gif (80 bytes)
Miva HeLp! HomeReady, Set, Go!TutorialsResourcesReviewsContact Us
one.gif (80 bytes)

Search Miva HeLp!

one.gif (80 bytes)
one.gif (80 bytes)

one.gif (80 bytes)

Quick Links

one.gif (80 bytes)

 

         Module in use by one or more orders and cannot be removed? 
   By Bret Sutherland from Viking Coders Copyright 2002
This article involves editing Database Files and is NOT for someone who does not know how to do that or is interested in experimenting.  This article is for advanced readers so please proceed with caution.

There are times when it's necessary--or just plain expedient--to tinkle with Merchant's databases so as to trick Merchant into disassociating orders from your shipping or payment modules. This scenario particularly arises when you want to remove a shipping or payment module that you no longer want to use (but you don't want to delete your old orders) or when you are trying to rearrange the order your shipping and payment modules appear in and thus need to temporarily remove a shipping or payment module. (Shipping and payment methods appear in the dropdowns displayed to customers in reverse order in which they were added.) The problem is that when you try to remove your module through the Merchant admin, you won't be able to and will instead see a warning message:

"Module 'name' is in use by one or more orders and cannot be removed"

But there is a way! A dangerous way, but it is a way nevertheless. To carry out this little task you will need to be able to edit a DBASEIII type database (without corrupting it! Hint: don't use Excel and don't try to open it in MS Access--you can link to it in Access though). If you have never edited a DBASEIII type database before, stop here! You will jeopardize your store by continuing...

Don't say you haven't been warned.

You will need to download the storemod.dbf ("Store Modules" database) from htsdata/Merchant2/0000000n/. Open it using your compatible database program. Make sure you keep a backup. Once it's open, you'll see a table with the following fields:

MODULE_ID | TYPE | REFCOUNT

What you need to edit is the REFCOUNT for the relevant module. Depending on which type of module you are trying to edit, if you only have one shipping module or one payment module in your store this will be very simple. You will need to edit the module where TYPE is "SHIPPING" (or "PAYMENT"). The REFCOUNT figure listed is the number of orders associated with that module. Change this to 0 (zero). Save the file, upload (you did make a backup, right?!), pack the store, and test to make sure everything is shipshape. If it's not OK, restore your backup. If the backup is not OK, call a plumber immediately. After finding out how much a plumber charges, contact a Miva developer and ask them to make the changes for you. You'll feel like you saved a lot of money.

If you have more than one shipping (or payment) module installed, chances are that you're not going to know which record in this table to edit so you will need to download and open the modules.dbf from /htsdata/Merchant2. modules.dbf lists all the modules installed on your domain. Find the name of the one you need to edit and take note of its ID number. Now, using this ID number, find the module in storemod.dbf that you opened earlier. Edit the REFCOUNT for that record, upload (just storemod.dbf), and you're away.

Pack the store for safety sake and to make sure that there aren't any problems with the editing you just did.

Quick Tips

one.gif (80 bytes)

one.gif (80 bytes)

one.gif (80 bytes)
one.gif (80 bytes)


Fotolia
    

Miva Merchant, and the Miva blades logo are registered trademarks of
Miva Corporation.

Miva HeLp! is not affiliated with Miva Corporation.

 

 

Please e-mail site related issues to webmaster@MivaHelp.com and content corrections to content@MivaHelp.com

Copyright 2001- 2008 Technology Matrix Group Ltd.

Site Design by: A Design Elf Site