Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 9b33d71

Browse files
authored
Merge pull request #295 from rain2o/update/mage2vs-generate-urls-param
Disable unique url generation for categories import
2 parents c15e057 + 607275d commit 9b33d71

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### Added
1010
- Constant for Mailchimp subscription status - @KonstantinSoelch (#294)
11+
- mage2vs import now has optional `--generate-unique-url-keys` parameter which defaults to `false` to enable/disable the url key generation with name and id for categories - @rain2o (#232)
1112

1213
### Fixed
1314
- The `product.price_*` fields have been normalized with the backward compatibility support (see `config.tax.deprecatedPriceFieldsSupport` which is by default true) - @pkarw (#289)

scripts/mage2vs.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ program
128128
.option('--skip-products <skipProducts>', 'skip import of products', false)
129129
.option('--skip-pages <skipPages>', 'skip import of cms pages', false)
130130
.option('--skip-blocks <skipBlocks>', 'skip import of cms blocks', false)
131+
.option('--generate-unique-url-keys <generateUniqueUrlKeys>', 'generate unique url keys for categories', false)
131132
.action((cmd) => {
132133
let magentoConfig = getMagentoDefaultConfig(cmd.storeCode)
133134

@@ -169,7 +170,9 @@ program
169170
if (cmd.skipBlocks) {
170171
magentoConfig.SKIP_BLOCKS = true;
171172
}
172-
173+
174+
magentoConfig.GENERATE_UNIQUE_URL_KEYS = cmd.generateUniqueUrlKeys;
175+
173176
const env = Object.assign({}, magentoConfig, process.env) // use process env as well
174177
console.log('=== The mage2vuestorefront full reindex is about to start. Using the following Magento2 config ===', magentoConfig)
175178

@@ -209,7 +212,8 @@ program
209212
'node_modules/mage2vuestorefront/src/cli.js',
210213
'categories',
211214
'--removeNonExistent=true',
212-
'--extendedCategories=true'
215+
'--extendedCategories=true',
216+
`--generateUniqueUrlKeys=${magentoConfig.GENERATE_UNIQUE_URL_KEYS}`
213217
], { env: env, shell: true })
214218
}
215219
}

0 commit comments

Comments
 (0)