Hot answers tagged

2

This is what I do to solve this problem: Database & Asset Syncing Between Environments in Craft CMS I've found that this KISS technique of just declaring one environment as the "gold master" and pulling changes to all other environments works really well for me.


2

I would try adding the following to your feed-me.php config file: <?php return [ '*' => [ 'clientOptions' => [ 'verify' => false, ], ], ]; c.f. https://github.com/craftcms/feed-me/issues/479 As noted here, this is generally not a very secure practice but should be fine if you're just wanting to import a local ...


1

You can try disabling Craft's queue temporarily by adding 'runQueueAutomatically' => false to general.php, then trigger the feed via the command line. Without testing this might prevent the 'Updating element slugs and URIs' job, but in any case – doing it this way you should see better performance overall. p.s. if you add --verbose to the end of the ...


1

Perhaps you could use the Preparse Field plugin, so that you only need to deal with one field. That would make the query easier. https://plugins.craftcms.com/preparse-field


1

i don't think it is possible via GUI but you can do this via feed me events and a simple plugin. because entrytype's fieldlayout and field mappings are different, in my solution, you should edit feed and update fieldmapping for each entry type, change the if condition of the code and run the feed again. Event::on(Process::class, Process::...


1

I would highly advise against trying to import anything directly into tables. I don't know when it was added, but everything now has a global identifier (UID) which you cannot add manually. FeedMe sounded like the right approach; I'd look at running that import on the production site and letting FeedMe import the content for you through the control panel ...


1

Craft are hoping to release this as an update to Commerce in the next month or so!


1

Found the solution. It's also necessary to create a row in the content table. Here's the query in case anyone would find it useful. Bear in mind I've hard coded the voucher type id as 7461 and the field layout ID for the gift voucher 34. # Query 1 Get all giftcards created from 1st Dec 2018 # Remove stored function DROP FUNCTION IF EXISTS ...


1

I think you'd be better off creating a quick module with a controller method to import your voucher codes, to make sure Craft (and Verbb Gift) create all the necessary table rows for the vouchers to work (code is untested, but just to get an idea): use verbb\giftvoucher\elements\Voucher; public function actionCopyVouchers() { $esVouchers = Craft::$app-&...


Only top voted, non community-wiki answers of a minimum length are eligible