Drupal Dump

Drupal Snippets, Hacks and more....

447 posts since 2011

Delete all user carts from particular user

If for some reason your commerce site gets stuck while in development with some bad data for user cart, to get rid of all the carts you can fire this code to delete all the carts for that user (probably admin or user 1)
 

Docker-sync commands

To start docker sync in foreground and see what is actually synching use this

docker-sync start --foreground

to do one time synch, use this

docker-sync sync

 

Docksal and VSCode and Xdebug

To setup xdebug with docksal and VSCode there is not much to do. Make your debug profile with info like this

Xdebug with VSCode and DrupalVM

After installing xdebug as extension to VS Code there is simple config you need to do to make it work with DrupalVM and debug. Create debug profile in standard VS code way and add this

Updating drupal commerce

Updating drupal commerce is still a bit messy, per docs here you need to run all of this to have any chance of updating