MySQL search and replace using update, set
[code language=”sql”]
UPDATE table SET column = replace(tablefield, "search", "replace");
[/code]
[code language=”sql”]
UPDATE table SET column = replace(tablefield, "search", "replace");
[/code]
It doesn’t happen often, but sometimes I need to wipe all products from a magento database during development. Either an import was written slightly off, or it was just full of test data and it’s cleaner to wipe the products instead of deleting them through the admin. A simple script for this found in a…
I spend a lot of time in magento development now a days, and because of that, I am constantly finding new extensions to help with my clients needs. I cam across something recently that was very cool to me. It’s an extension that allows a magento site to let people design and sell their own…
I’ve had issues from time to time where a sql file won’t import because if has a definer in it that doesn’t match the server I’m trying to import the file to. A simple linux command can replace the definer in these dump files to be the current user allowing everything to work as intended….
I added downloadable products to a store, but wasn’t able to check out with them. They were straight-forward products with a single pdf as the sample and downloadable product. Everything looked fine, but when I added the product to the cart, it threw this error: Look at /app/code/core/Mage/Downloadable/Product/Type.php line 326 [sourcecode language=”php”] /** * Check…
Magento follows a pretty straight-forward templating structure. Well, it’s straight forward once you get to know it. It can be a little confusing at first to a html designer or someone who has worked in drupal or wordpress. The first thing to remember is that anything not defined falls back to base/default. So if you…
So I posted some code earlier today and didn’t like how it looked. Logic kicked in and I searched for a wordpress plugin to render code better. I found WordPress Syntax Highlighter. It works well, but as you can see (If I haven’t corrected it yet) from my previous post, it’s not perfect. My class…