Posts Tagged linux

Show default price for Magento Bundled products!

Greetings fans, friends, and lovers!

I was going through my directory of Magento mods and found this little snippet that I had made for a client.     I figured some of you cats might be interested, so I just zipped it up into a nice module and am posting it here.    This extension shows the default (base price) of a Bundled Product in the product catalog, as opposed to the lowest price.    This is just a little thang, so I'm giving it away for free.    Enjoy!

Bundled Product

Bundled Product

Download BundleBase Here!

Installation

1. Upload to your base Magento directory and unzip

2. Clear your cache

3. Voila!

Tags: , ,

No Comments

Magento MySQL Order Export Tool v1.01

Magento

Magento's database structure is rather arcane, but the API provides a clean way of retrieving order data. So, I made this little tool to pull Magento's orders from the API and then populate these orders in a second MySQL database. The orders are exported to two tables : mage (the order data, including customer shipping and billing information), and mage_items (which includes info on the items purchased). The tables are linked by the increment_id (which is also the order #), so it makes for a very readable database. This tool was designed for reporting, but could likely be useful for other applications... If anyone has any suggestions or improvements definitely send 'em my way!

Installation

  1. Create a Magento API username and key (done within the Magento back-end)
  2. Untar to a protected directory on your webserver ("tar -xvf magesync_v1.00a.tar")
  3. Edit /etc/cfg.php and define your absolute path, database host, database name, database username, database password, Magento API URL, Magento API username, and Magento API key
  4. Setup a CRON job and set to run as desired (ex, "cd /path/to/magesync; php -q cron.php")
  5. Watch and be amazed as Magento's database is demystified!
Download MageSYNC v1.01

Update Log

01/06/2010 - Removed removeMagicQuotes and unregisterGlobals functions since they appeared to be causing problems on some systems (and were also superfluous)

Tags: , , ,

3 Comments

Magento <=> FedEx API (WSDL v6)

Warning: THIS POST IS DEPRECATED! I gave up trying to hack OrderShip and wrote my own extension (http://www.illapps.com/shipsync.html)..    I'm leaving the post here for reference, but I strongly suggest going with a commercial solution.

Read the rest of this entry »

Tags: , , ,

11 Comments

How to add custom fields to Magento checkout

Custom Magento checkout fields

Here's a quick easy way to add fields to the checkout process.

 

1. Visit Magento Connect and install the Customer Order Comment Extension
  • Magento Connect can be accessed from the Magneto Admin panel by going to System -> Magento Connect -> Magento Connect Manager
  • If you have difficulties with Connect, check out my other post regarding Connect permissions

 

2. Update Magento template files
  • Check out the sample file templates in  /app/code/community/Biebersdorf/CustomerOrderComment/design/ and copy these files over the corresponding files in your template.    You may also use these files as a reference, and simply modify your existing template files.
  • To update the displayed text, modify this line in each of the aformentioned templates -> <?php echo $this->helper('biebersdorfcustomerordercomment')->__('How did you hear about us?') ?>
  • If you do not already have a custom template, I suggest installing the Magento Blank Theme and modifying this instead of the default Magento template

 

3. Voila!
  • Make sure your Magento cache is turned off, and test the checkout process.   You should now see the new field on the checkout confirmation page.

 

Room for improvement?

Certainly.     You can add additional fields by following these steps ->

  • Modify /app/code/community/Biebersdorf/CustomerOrderComment/design/mysql4-install-0.0.3.php and add the desired EAV-Attributes in the "sales/order" entity.
  • Run this file and it will create the attributes and corresponding database entries
  • Add the form fields in the template files
  • Modify /app/code/community/Biebersdorf/CustomerOrderComment/Helper/Data.php to grab these new fields and save them in the database

Tags: ,

6 Comments

CHMOD Octal Cheat Sheet

 

It's simple, really.

7 rwx read, write, execute
6 rw- read, write
5 r-x read, execute
4 r-- read
3 -wx write, execute
2 -w- write
1 --x execute
0 --- no permissions

 

Here are a few examples :

chmod 777 (rwxrwxrwx)
chmod 775 (rwxrwxr-x)
chmod 666 (rw-rw-rw-)

 

Further Reading

http://en.wikipedia.org/wiki/Octal
http://en.wikipedia.org/wiki/Chmod

Tags:

2 Comments

Magento Connect File Permissions Fix

 

 

"Error: Please check for sufficient write file permissions"

 

Uh oh, looks like something's wonky here.

 

If you are running PHP as an Apache module, Magento Connect will need full write permissions to perform upgrades, so you must apply a temporary hack while using Connect.    

 

Use an SSH client to connect to your server, navigate to the Magento directory, and enter this command :

  1. find . -type d -exec chmod 777 {} \;

 

Now, login into the Magento control panel, and use Connect to apply any needed updates and/or extensions.

 

When you are finished, you must repair the permissions :

  1. find . -type d -exec chmod 755 {} \;
  2. find . -type f -exec chmod 644 {} \;

 

Next, set write permissions on your server. Here are the recommended settings :

  1. chmod o+w var var/.htaccess app/etc
  2. chmod 550 pear
  3. chmod -R o+w media

If you run into trouble, try playing with the permissions on the "var" and "app/etc" directories (ex, "chmod 775 var var/.htaccess app/etc").   

 

Voila.

Tags: ,

6 Comments