Magento Resource | E-Commerce Generation Explorer

CAT | magento

This article will show you how to write custom shipping method in Magento commerce.
First we need to write our shipping method, it’s a class in folder app/code/core/Mage/Shipping/Model/Carrier/.
You can create a new one which codes as below, I named it as newflatcustom.php (you can copy from Flatrate.php):
(more…)

·

If you need to change the footer copyright notification use the next instruction:

1. Open the Magento admin panel
2. Select the “System” tab
3. Click the “Configuration” menu item
4. Select the “Design” menu item
5. Click the “Footer” tab. Here you can change the copyright notification
6. With that done, click the “Save Configure” button.

· ·

Here is a quickly reference for how to remove the “My Downloadable Products” on Customer Account Dashboard.

In app/design/frontend/default/default/layout/downloadable.xml, remove this in the beginning of the file:

1
2
3
4
5
6
7
8
9
<customer_account>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="downloadable">
<name>downloadable_products</name>
<path>downloadable/customer/products</path>
<label>My Downloadable Products</label>
</action>
</reference>
</customer_account>

OK, We done it.

· ·

I just got this email from one Magento Hosting Provider – SimpleHelix which I mentioned before:

Dear XXXX,

Can you believe that Thanksgiving is already here? Thanksgiving is an American holiday that celebrates the spirit of giving. Thanksgiving is this Thursday (November 26th, 2009) and we at SimpleHelix hope you have a Happy Thanksgiving!

In the spirit of giving, we want to offer you a special “Black Friday” deal. This Friday, we are offering 50% of EVERYTHING! You heard right, EVERYTHING from shared hosting, dedicated servers, domain registration, domain transfers, SSLs, IPs, upgrades, and more. If you want to take part in this great savings event, just use the promotional code “SUPERsavings” during checkout. This will take 50% off of your first month’s payment! Don’t miss out!

Happy Holidays,

Simple Helix, LLC

So the link is here: https://www.simplehelix.com/

Subdirectory Method

This is the same scenario as above, except all of the shops will be in subdirectories, e.g.:

  • mall.com/shoes
  • mall.com/shirts

Here’s how we would set this up for the shoes subdirectory:

  1. Login to your site via SSH, and create a subdirectory where your second store will be:
    • cd public_html
    • mkdir shoes/
    • cd shoes/
  2. Copy the index.php and .htaccess file from the directory where Magento is installed, which would be in our root web directory:
    • cp ../public_html/index.php ../public_html/.htaccess .
  3. Open up the index.php file that we just copied over and replace the following line of code:
    1
    
    $mageFilename = 'app/Mage.php';

    …with the following:

    1
    
    $mageFilename = '../public_html/app/Mage.php';
  4. With the index.php file still open, replace the following line of code:

    …with the following:

    1
    
    Mage::run('shoes', 'website');

· · · ·

Adding Another Store In Magento

The first thing we need to do is setup our second store in Magento.

We’re going to do a hypothetical here for the naming conventions, and assume we own shirts.com. Adjust the values accordingly for your own store.

  1. Login to the Magento admin.
  2. Go to the Catalog tab, and select Manage Categories.
  3. Click on the Add Root Category button on the left.
  4. On the right, for the Name, we’ll enter Shoes.com. Set the dropdown to Yes for both Is Active and Is Anchor.
  5. Click the Save Category button.
  6. (more…)

· · ·

As I mentioned before, I am doing a multi-language and multi-currency website at that moment. So I found a lots information about how to setup the multiple store from internet. Here is a good one:

From crucialwebhost.com

———————————————————————————————————

There are numerous ways to setup multiple Magento stores that all share the same codebase and backend, but what method you use depends on your needs.

This article is written with cPanel in mind, though the methodologies listed below apply no matter what control panel you’re using.

There are numerous ways to setup multiple Magento stores that all share the same codebase and backend, but what method you use depends on your needs.
This article is written with cPanel in mind, though the methodologies listed below apply no matter what control panel you’re using.

(more…)

· · · ·

Here is a quick reference for you, if you run Magento under Multi-language, Multi-Currency or Multi-Domain (Multi-Website).

Sometime you need pick up the Store ID do some (IF…ELSE…) work. Here is the code:

1
<?php $store_id = $this->helper('core')->getStoreId(); echo $store_id; ?>

· ·

I am busy on a big project about Magento.
I will update the blog as my work notes.

We will add four fields into Account/Registration Page.

Four core files:

app/design/frontend/default/yourtheme/template/customer/form/register.phtml – Has the HTML form for initial registration Note: this file will also be used for a one-shot database extension

app/design/frontend/default/yourtheme/template/customer/form/edit.phtml – Has the HTML form for edit by customers

app/code/core/Mage/Customer/Model/Entity/Setup.php – Has an array full of customer attributes to use for registration

app/code/core/Mage/Customer/etc/config.xml – Has a description of fields to be used in the forms

app/code/core/Mage/Customer/controllers/AccountController.php – For checkbox option
(more…)

·

Some Methods to Speed up Magento – a Guide to Making Magento Faster
1. Install Fooman Speedster
This one made a massive difference to page loads for the first site I am testing.
http://www.magentocommerce.com/extension/457/fooman-speedster
2. Enable Gzip Compression in .htaccess
http://www.magentocommerce.com/boards/viewthread/7100/
To do this, uncomment this part in the .htacess: (Line 52)
#php_flag zlib.output_compression on
(ie Remove the # save and reupload)
(Next are from – http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/)
3. Install APC or Xcache
APC – http://pecl.php.net/package/APC
Xcache – http://xcache.lighttpd.net/
Looking at benchmarks and folks comments, it seems to be a toss of coin which one to go for.
I will probably go for APC on balance.
Will be asking my host to install this.
Ok. My host installed it. And further to Discovery posting below, thought I would add that in here to the main body. Discovery pointed out that thread here had extra tips once APC had been installed: http://www.magentocommerce.com/boards/viewthread/9882/
Essentially, after APC has been installed, you locate the local.xml file in the install. (Mine was here – /home/yoursitename/public_html/app/etc/local.xml
You then add the following code to just below:
<global>
<cache>
<backend>apc</backend>
<prefix>alphanumeric</prefix>
</cache>
I have to say that I actually have installed APC, and then tried this, but that it actually slowed down my server. Response times went up from about 2 seconds to 3 seconds.
Your mileage may however vary, so give it a go
4.”Modify the configuration for your MySQL server to take better advantage of your server’s RAM. Most Linux distributions provide a conservative MySQL package out of the box to ensure it will run on a wide array of hardware configurations. If you have ample RAM (eg, 1gb or more), then you may want to try tweaking the configuration. An example my.cnf is below, though you will want to consult the MySQL documentation for a complete list of configuration directives and recommended settings.”
They have a list of settings there for my.cnf as follows:
key_buffer = 512M
max_allowed_packet = 64M
table_cache = 512
sort_buffer_size = 4m
read_buffer_size = 4m
read_rnd_buffer_size = 2m
myisam_sort_buffer_size = 64m
tmp_table_size = 128m
query_cache_size = 96m
query_cache_type = 1
thread_cache_size = 8
max_connections = 400
wait_timeout = 300
Again, get your host to do it, (which is what I will be doing  ) or figure it out.
5. This thread here – http://www.magentocommerce.com/boards/viewthread/5366/P60/ – Includes a post from a Server Admin at Rackspace who had experience optimizing for Magento
The two that jumped out at me were:
a/ First off, I made some changes to your system, I increased the APC.shm.size to 128 This will allow more data to be cached by apc, in theory it’ll store more data.
(This sounds like it is linked to APC above – So maybe install APC first before doing this  )
6. From thread above:
“I also made some changes to the vhost.conf file for the shop site, historically disabling open_basedir allows magento to work slightly better.”
No idea what this is. Any guru’s care to comment? A step by step would be useful from someone if you know how to do it.

Some Methods to Speed up Magento – a Guide to Making Magento Faster

1. Install Fooman Speedster

This one made a massive difference to page loads for the first site I am testing.

http://www.magentocommerce.com/extension/457/fooman-speedster

2. Enable Gzip Compression in .htaccess

http://www.magentocommerce.com/boards/viewthread/7100/

To do this, uncomment this part in the .htacess: (Line 52)

#php_flag zlib.output_compression on

(ie Remove the # save and reupload)

(Next are from – http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/)

(more…)

·

<< Latest posts

Older posts >>

Theme Design by devolux.nh2.me