Skip to content

Instantly share code, notes, and snippets.

@trabulium
Created May 28, 2018 07:05
Show Gist options
  • Save trabulium/92ad6f7144fb9ac7c9a0d9ac3635d8a6 to your computer and use it in GitHub Desktop.
Save trabulium/92ad6f7144fb9ac7c9a0d9ac3635d8a6 to your computer and use it in GitHub Desktop.
Bulk add am_shop_by images based on the brand name / meta title
UPDATE am_shopby_value
SET img_medium = Concat(Lower(REPLACE (meta_title, ' ', '-')), '.jpg')
WHERE img_medium = ''
AND filter_id = 1
AND meta_title NOT LIKE ( "a:%" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment