Magento Themes and Magento Extensions

Magento: Add Product To Cart By SKU – Form

Posted on June 2nd, 2011 | Posted by admin

Today I had to figure out how to create a way for people to add a product to their cart by just entering in a SKU and a quantity. They call it the “Quick Order.” It is really quite simple to implement if you want to add this functionality to your site.

Disclaimer: I’m sure there’s a much better way to do this, but, this method works just fine for me.

First thing – create a new CMS page (or put this code in one of your templates). I used a new CMS page called “Quick Order.” Here’s the code for the form. You can style it up however you’d like:

Magento: Category Import Script?

Posted on June 2nd, 2011 | Posted by admin

Currently, there is no way to import categories unless you write your own script or sql. I may have a project coming up soon that will require importing a lot of categories, so I may have to build a better script (I’ve built a couple crappy ones already) for importing them. But, before I do that, I’d like to get some feedback.

First – CSV setup. What I’m assuming the best global way to import is from a CSV (correct me if I’m wrong). In that case, what do you think the best format of the CSV should be? My initial thoughts would be 2 columns. First one for the category name, second (if used) is for which category name the category is nested under. (I suppose there could be other columns as well for Enabled or Disabled, meta, image, etc.)

Second – Anything else that would be useful for a category import script?

I can’t guarentee that I’ll be able to have the time to do this – but we’ll see. The better and level of feedback I get, the more motivation I’ll probably have!

Magento FirePHP extension

Posted on June 2nd, 2011 | Posted by admin

FirePHP is Firefox add-on that enables you to log to your Firebug Console, which makes it great debugging tool for any web developer. I’m using it, like it and can’t live without it for some time now  So here’s nicely packed Magento FirePHP extension, I believe you’ll be seeing it at Magento Connect in a while.

You can get it via file: or even better, use Magento FirePHP Extension on Magento Connect.

Since FirePHP is implemented in Zend Framework it’s really easy to use it with Magento, my friend Branko wrote about it before.

Download FirePHP from its homepage You must have Firebug installed and the “Net” panel enabled to use it, and Firefox of course.

Magento: Product Import Script : Update 1

Posted on June 2nd, 2011 | Posted by admin

There’s a lot of people checking my blog regularly, but not a lot of people signed up to my Twitter account to get updates on the progress, so I figured it would be a good idea to give updates occasionally on the blog. (If you want the BEST updates on the progress,subscribe to my Twitter).

Tonight I was able to successfully import custom attributes, of many types, even dropdowns. So, the good news is that in the script, you’ll be able to just include whatever columns you want for any custom attributes that you’ve created – and consider them imported!

The trickiest part was/is the dropdown attributes. These aren’t just a simple value that I can place into the database. The values for these have been pre-populated. So, first I need to check the database for the column, figure out if it is a user-defined attribute, then figure out if it is a dropdown, then search the database for the specific value that was given in the column. If it is off at all, or not found at all then I need to create error handling and logging for this issue and figure out what to do. That part isn’t complete yet. So – at this point, if the value isn’t found – an ugly PHP error is issued. But, I’ll get to that next.

After that is complete – I just need to figure out a way to handle all sorts of default values (if you choose not to include a lot of columns) so that the product is sure to get all the values it needs to function properly. Once that is done – and some overall loose ends are tied up – I think I will be ready for some beta testing (for any of you out there interested in helping test it out).

Magento: Custom Page Templates in CMS Layout Dropdown

Posted on June 2nd, 2011 | Posted by admin

Creating new page templates is as easy as duplicating and editing the files in /template/page/. However, you can add as many new ones as you want, but no new ones will show up in the Layout dropdown when selecting a template to use for a specific CMS page.

The solution: Create your own simple module to add your templates. This should only take you 5 minutes if you know what you are doing with custom modules.

Step 1: Create Your Module Config File

Create this file: /app/code/local/YOURMODS/CmsTemplates/etc/config.xml and put the following code in, modifying it to suit your templates:

Page 19 of 19« First...10«1516171819