Archive

Archive for the ‘blog posting’ Category

Magento Notes — Customizing the RSS Feed that Magento Outputs

November 11th, 2009

One of the marketing strategy employed by many e-commerce sits is to provide product feeds (RSS) to have them be displayed in an affiliate or partner blog or content-driven web sites.  I’ve recently came across this need to do just that and what I have found is that the default Magento RSS feed is clunky and display the entire product description as part of the feed items.  The way to customize the output is go to into the following file (NOTE: this workaround requires modify Magento core file, which may become a hassle and you update your Magento installation):

\app\code\core\Mage\Rss\Block\Catalog\

under the above folder, you will see different files (category.php, new.php, tag.php, etc.) each file controls the output of each type of RSS feed Magento has built in by default. So if you want to modify the RSS feed format for your products in a certain category you would modify the category.php file. For me, i was looking at syndicating my new products, so I modified new.php file.

When opening up the new.php file, scroll down to approximately line 99-104, under the public function addNewItemXmlCallback($args) is where the RSS feed content is formatted, so you can simply move around the html table and or select to replace the product description with the short description, etc.  For me, I simply removed the long description and kept the pricing, product image and the product title. Below is my revised output code snippet:

$description = ‘<table><tr>’.
‘<td><a href=”‘.$product->getProductUrl().’”><img src=”‘. $this->helper(’catalog/image’)->init($product, ‘thumbnail’)->resize(75, 75) .’” border=”0″ align=”left” height=”75″ width=”75″></a><br>Price:’.Mage::helper(’core’)->currency($product->getPrice()).
($product->getPrice() != $final_price  ? ‘ Special Price:’. Mage::helper(’core’)->currency($final_price) : ”).
‘</td>’.
‘</tr></table>’;

and the output looks like the following when it gets syndicated to a content driven site, you see the RSS feed of the products at the right side of the screen:

http://links.chosen29.com - this is a PLIGG-driven bookmarking web site similar to Digg.com

http://links.chosen29.com - this is a PLIGG-driven bookmarking web site similar to Digg.com

The RSS feed from Magento is fed through Google’s Feedburner and then syndicated thereafter, primarily for the purpose of better exposure and trackability.

Lastly, here’s a shameless plug, please visit my new web site at Chosen29.com

blog posting, e-commerce, magento ,

Magento Notes — Adding Company Name, Address, Phone in Registration Form

August 26th, 2009

This is a simple yet practical fix that, for some reason, Magento never got around to enabling upto Magento Version 1.3.2.3.

Basically by default the Magento registration form only requires you to enter First Name, Last Name, Email and VAT/Tax Number, but that in a real world scenario is not practical and not enough for business owners to follow up on.  Base on looking into the code here: app/design/frontend/default/blue/template/customer/form/register.phtml, we know Magento has every intention of adding additional fields, just they haven’t been enabled.

By following the fix here, you can reveal the additional fields. Essentially you just have to comment out a IF-Then statement to reveal the proper form fields. Below is the result:

blog posting, magento, technical notes , , , ,

Tickon.com for Sale

July 28th, 2009

We are selling our e-commerce web site: www.tickon.com.

Why are we selling? Becuase we have more projects to work on, and we simply don’t have time to operate the business side of the e-commerce site, and that includes marketing the site, fulfilling orders, finding new products, and most importantly — providing excellent customer service.

How much are you selling for? Make your best offer and we will consider every bid.  We just want the site to be in good hands; someone willing to put in the effort to market the site.

What’s included? We will include the domain name, help you move to your desired web hosting company? or we will host it for you for a small monthly fee. You will also have the code (the site runs on Magento 1.2.1), and the existing database, and you will be hooked up with the product supplier for future order fulfilment (they are a great supplier to work with!!).

For more information email me at jerry at casualcommerce dot com

blog posting, e-commerce, magento , , ,

Digg Clone — PLIGG — Showcasing News.52my.Info

July 18th, 2009

Look around on the net and search for a digg-like software to create a social voting news platform, you will most likely find Pligg as the popular choice of open source software that does pretty much what Digg.com does.

After evaluting the platform, I find the platform easy to implement, with one catch being that at its current state, you can’t install it locally or even on a production server under a virtual directory.  For example you will not be able to install it under http://www.52my.info/digg, instead you will need to install it at the root of its own domain, so here’s my site: http://news.52my.info

Obviously, I have localised it for Chinese audience..and the back-end admin have made in-line translation easy and the use of smarty template made customizing easy (I stuck with the wistie default template, as I found it to be good enough).

Enjoy.

blog posting, evaluation, recommendations , , ,

Performance tuning for Magento

June 26th, 2009

For the most part, I have used WAMP on Windows XP for development and used Simple Helix for magento hosting; they really do make Magento run fast on their server.

Recently working on a project in which the client wants to host the web site themselves, but by default, the LAMP implementation is totally not optimized for Magento.

Did some research and came across this post filled with performance tuning tips..althought i haven’t tried them, but I believe the tips are worth a try if you are hosting your own magento installation.

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

blog posting ,

Problem with Magento not able to download/install extensions

June 24th, 2009

Not sure if it’s just me.  But for every Magento development done, whenever I upload my code to the production server, the code would run fine, but when it comes to installing extensions using Magento Connect, it would never properly install the extensions (even though it claims that it has successfully installed the ext.).

The problem appears to be an issue with the “Downloader” folder not being writeable in the production environment; this makes perfect sense from security perspective, but there just needs to be better documentation on how to best setup the site so that Magento Connect works as advertised.

I googled and came across the following post: https://www.gigapros.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=164, the long and short of is is simply to make Magento fully writeable (777) when you run the Magento Connect, and then reset the permissions after the extension has been installed….it’s a somewhat satisfactory workaround i guess.

Here’s how to do this thru your SSH client. Log in to your SSH account and then execute the following commands:

1. cd <your_magento_folder_path>
2. find . -type d -exec chmod 777 {} \;
3. chmod 666 downloader/config.ini

You should now be able to access the Magento Connect Manager. When you have finished the installation/upgrade, you should reset the permissions by executing the following SSH commands:

1. find . -type d -exec chmod 755 {} \;
2. find . -type f -exec chmod 644 {} \;
3. chmod o+w var media app/etc/use_cache.ser

blog posting , , ,

Strategically inserting Google ads into Wordpress blog

May 21st, 2009

Have been working hard to promote blog.52my.info, but have realized that there isn’t an easy way to add google ads more naturally in between posts.  Some research landed me on Problogger.net (an excellent blog that teaches/motivates people how to make money blogging — I am a believer in Darren).

To more naturally add google ads, what you simply need to do is modify your “Main Index Template” usually the index.php file.  In there you should find a while loop that looks something like:

if (have_posts()) :
while (have_posts()) :
the_post();
the_content();
endwhile;
endif;

just change it to something like this:

// Set Counter to 1, First Post
$counter = 1;
if (have_posts()) :
   while (have_posts()) :
      $counter = $counter + 1;
      the_post();
      the_content();
      if(2 == $counter)
      {
         echo 'Adsense code';
      }
   endwhile;
endif;

the things to look for and add are in bold.  The “2″ indicates that google ads will be inserted in every 2 posts. This information was obtained here

blog posting, technical notes, wordpress , ,

Magento Notes — Default sorting is not logical

May 19th, 2009

Now that I have my e-commerce site, tickon.com, running for a while (3-months), I am back at it adding more products to link to my affiliate partners (this is a new experiment on this web site).

As I started to add new products, I noticed that newest items are added to the last page of the category that it was assigned to…not a very smart implementatio in my opinon. Did some googling and found a fix here:

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

Essentially what needs to be done is to fix the file: app/code/core/Mage/Catalog/Block/Product/List/toolbar.php

near line 47, I changed the original code to the following:

$this->_availableOrder = array(
‘entity_id’ => $this->__(’Newest’),
‘name’      => $this->__(’Name’),
‘price’     => $this->__(’Price’)
);

The first item listed will be the default sort filter, the default was “best value”…which didn’t make a lot of sense to me.

Second item to fix up is in the same file, but you go to line 108 (approx.) and modify the highlighted part as below:

public function getCurrentDirection()
{
if ($dir = (string) $this->getRequest()->getParam($this->getDirectionVarName())) {
$dir = strtolower($dir);
if (in_array($dir, array(’asc’, ‘desc’))) {
return $dir;
}
}
return ‘desc‘;

default is asc, but you need to change it to descending so that it sorts from newest id first.

blog posting, e-commerce, magento, technical notes , ,

Relaunch of OCCACC.ORG

May 5th, 2009

I would also like to take this time to announce the relaunch of Orange County Chinese-American Chamber of Commerce (OCCACC.ORG) web site.  It is a web site dedicated to  developing Chinese-American commerce by providing assistance in business management business operation, trade materials, and business experience.

Please send any questions and feedback related to the web site to me. Thanks.

blog posting, news, wordpress , ,

Upgrading Wordpress from 2.6.x to 2.7.x

May 5th, 2009

I have recently being doing a lot of moving. Moving web sites that is, from Godaddy to Simplehelix, as i am trying to clear my godaddy vps to be dedicated for 52my.info web site. The hits on 52my.info has been growing steadily. But we are hoping for a POP soon!!

Anyways, as I start moving my sites from one host to another, i figured, why not take the time to also upgrade my older blog sites to the newer WP versions, so I did a quick search and I came across a great post by Siddharth, but I will do a quick summary of what worked for me:

1. Backup the following files and folders :
* Folder: wp-content (backup the whole directory)
* Config File: wp-config.php (file)
* Database: Database (using phpmyadmin, backup the whole database, safe.)
2. Downloaded the latest Wordpress here.
3. Delete all the old Wordpress files .
4. Extract and upload (or upload and extract) the new Wordpress files.
5. Copy the wp-config.php to the Wordpress root directory.
6. Run wp-admin/update.php (http://yourwordpresssite/wp-admin/update.php). It will ask for a database upgrade, continue. If all goes well it will redirect to a blank page.
7. Delete the new wp-content directory and upload your old wp-content directory in place of it.
8. Visit your site! All your posts and plugins will be active and it will look the same! (All incompatible plugins will be disabled automatially, but most of the plugins that work with 2.6.* also work with 2.7
9. Admin URL is the same: http://yourwordpresssite/wp-admin/

Thanks Siddharth!! for for this wonderful guideline!!

blog posting, wordpress , ,