Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'd assume that flatrate shipping methods are configuration and thus can be managed via features - however they are just stored into the database and not managable like config at all.
Maybe we could just convert them to exportable entities from the entity api? This would take care of the right now manually implemented crud hooks and give as features support as well as a default hook (as asked for in other issues). Also, it would help with i18n integration.
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedThat would be really smart (flat rates as exportable entities).
It would also allow us to use the inline_conditions module to provide a UI for when a flat rate should apply.
Comment #2
dasjoin the meantime, you can use this install task for one-time initialization.
Comment #3
dasjoalso see [#6591174-8]
[#6591174]
Comment #4
fox mulder CreditAttribution: fox mulder commentedHi all!
I don't understand everything from this thread (my english is pure), but I have same issue than described in issue title. The flat rate services are exportable with Features, but the rule components are not, because the component name of a flat rate service look like this: commerce_shipping_service_SERVICE_NAME, but the feature creation procedure puts this line in MYFEATURE.info: features[rules_config][] = commerce_flat_rate_services_SERVICE_NAME
commerce_flat_rate_services_SERVICE_NAME named rule component does not exist and MYFEATURE.rules_defaults.inc does not contain $item['commerce_flat_rate_services_SERVICE_NAME'].
I don't understand the way of this mechanism, maybe my problem is Features/Commerce shipping/Commerce related
Comment #5
fox mulder CreditAttribution: fox mulder commentedI think this patch solves this problem: https://www.drupal.org/node/1402762#comment-6591174
I'm using commerce kickstart and it contains the previous version of this patch: https://www.drupal.org/node/1402762#comment-5985864 or something similar...
Comment #6
das-peter CreditAttribution: das-peter commentedAdding related ticket.
Comment #7
das-peter CreditAttribution: das-peter commentedComment #8
rszrama CreditAttribution: rszrama commentedI just had a project recently where I exported flat rate services just fine via the Commerce Features module. Am I missing something?
https://www.drupal.org/project/commerce_features