Download & Extend

Make taxes exportable (export/import/features)

Project:Ubercart
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Hi

I'm attaching a patch I'm working in for this, I need to export my taxes for including them in a distribution.
I had to change the original id for the taxes so they could be exported by ctools (numeric ids are not supported, alphanumeric are strongly recommended for tables that store settings). I've also included a update_N that modifies all the existing ids (it also update the conditional actions table) to convert them to alphanumeric.
Once all the ids are alphanumeric, can be exported by ctools both using the export link in the taxes administration page and using features. Taxes can be imported as well.

Please apply this patch carefully if you have a running ubercart installation.

I think that we can use something similar for exporting another settings, like shipping quotes and payment methods. Let me know what you think.

AttachmentSizeStatusTest resultOperations
taxes_exportable.patch10.54 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch taxes_exportable.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test

Comments

#1

Status:active» needs review

Ok, forget about the first patch, I've worked with exportables module 2.x (http://drupal.org/project/exportables) and I've came up with a lighter patch for getting taxes exportable, which means that you can export them, import in another site/enviroment and include them in features.
An uc_taxes.export.inc is included as well.

AttachmentSizeStatusTest resultOperations
ubercart-832892.patch7.66 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ubercart-832892.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test
uc_taxes.export.inc_.txt2.56 KBIgnored: Check issue status.NoneNone

#2

Correction of the patch path (was from uc_taxes folder, I've modified to be in ubercart folder directly)

AttachmentSizeStatusTest resultOperations
ubercart-832892.patch7.74 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ubercart-832892_0.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test

#3

Only for commodity purposes, this is the same patch than in #2 but for 2.2 version

AttachmentSizeStatusTest resultOperations
ubercart-2.2-taxes_exportables.patch7.73 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ubercart-2.2-taxes_exportables.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test

#4

Category:task» feature request

Some bugfixes and rolled against last dev version. Export file remains the same of #1

Nobody else finds this interesting to have in ubercart?

Also attaching patchfile for 2.2

AttachmentSizeStatusTest resultOperations
ubercart-832892.patch8.58 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ubercart-832892_1.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test
ubercart-2.2-taxes_exportables.patch8.59 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ubercart-2.2-taxes_exportables_0.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test

#5

Thanks for the patch! I might need this later this week for a project. I'll report back what I find.

#6

Rerolled against 2.4 and -dev

To do:
hook_schema_alter to include the exportables & ctools options in previously installed ubercart installs
Revert capability

AttachmentSizeStatusTest resultOperations
ubercart-832892-exportable-taxes.patch15.54 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ubercart-832892-exportable-taxes.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test
uc_taxes.export.inc_.txt2.96 KBIgnored: Check issue status.NoneNone

#7

Status:needs review» needs work

I think this is a good idea.

Let's put it through the testbot as a first step to getting this issue back on track.

#8

Status:needs work» needs review

#9

Status:needs review» needs work

The last submitted patch, ubercart-832892-exportable-taxes.patch, failed testing.

nobody click here