Hi
Would it be possible to add the option to clone a flat rate service, with all its components?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ziobudda’s picture

Any news ?

DamienMcKenna’s picture

Title: Clone support » UI option to clone a flat rate definition
Assigned: Unassigned » DamienMcKenna
Issue summary: View changes

Am working on this.

DamienMcKenna’s picture

Assigned: DamienMcKenna » Unassigned
Status: Active » Needs review
FileSize
3.72 KB

This appears to work.

Besides cloning the shipping rate, it also needed to clone the rule conditions onto the new rule, after some fiddling I finally worked out how to make it work.

DamienMcKenna’s picture

FYI you'll need to clear the caches (or at least rebuild the menus) to have this work as it adds a new menu item.

DamienMcKenna’s picture

The patch adds a new "clone" option on the shipping rates list:
Shipping rates list

Clicking that "clone" link opens up the edit form with the values of the original rate added and the name set to "Clone of [original name]":
The form for cloning the rate

Clicking "Save flat rate" will result in the clone being saved:
Shipping rates list, with the clone present

In addition all of the conditions will now be present on the new rate:
The new rate's conditions