Archive

Archive for the ‘e-commerce’ Category

Give your products more exposure on Google Base

February 17th, 2009

Just spent 2 days to get my products on Tickon.com listed in Googlebase.  By having the products listed in googlebase, you can get additional exposure on Google’s database, as well as more opportunities for Google crawlers to find your products and link to your site. 

Since Tickon.com is still running on an older version of Magento (still need to find time to upgrade, but I am afraid of the upgrade process due to bad past experiences), the tutorial here from Magento didn’t really help. But if you are on 1.1.7, you should check out the video! They have added extra menu options in the admin page to facilitate this.

So without the automated features to export from magento and into googlebase, the process becomes a manual process of exporting out a .txt file and uploading it into googlebase.  To export, you can use this workaround that I found on the Magento forum; thanks Turbo1.  Simply download the gbase.php file (or view the script below), modify the path to where you want to save the file (for me, i saved it to /var/export), and simply drop the file into the Magento root folder and then access the file like this: http://www.tickon.com/gbase.php, and this would create the required .txt file into the /var/export folder.

Now that you have the file, you can simply create a datafeed in googlebase and upload the txt file.  without this gbase.php file, using the default Export Magento module would be difficult, but not impossible!

Have fun.  My next task…feeding the products into Feedburner.

<?php
define(’SAVE_FEED_LOCATION’,'var/export/google_base_feed.txt’);//you can set a new folder and file if you want, don’t forget to chmod the folder to 777

// make sure we don’t time out
set_time_limit(0);

require_once ‘app/Mage.php’;
Mage::app(’default’);

try{
$handle = fopen(SAVE_FEED_LOCATION, ‘w’);

$heading = array(’id’,'title’,'description’,'link’,'image_link’,'price’,'brand’,'product_type’);
$feed_line=implode(”\t”, $heading).”\r\n”;
fwrite($handle, $feed_line);

//———————- GET THE PRODUCTS
$products = Mage::getModel(’catalog/product’)->getCollection();
$products->addAttributeToFilter(’status’, 1);//enabled
$products->addAttributeToFilter(’visibility’, 4);//catalog, search
$products->addAttributeToSelect(’*');
$prodIds=$products->getAllIds();

//echo ‘Product filter: ‘.memory_get_usage(false).’<br>’;
//flush();

$product = Mage::getModel(’catalog/product’);

foreach($prodIds as $productId) {
//echo ‘. ‘;
//flush();
//echo ‘Loop start: ‘.memory_get_usage(false).’<br>’;
//flush();

//$product = Mage::getModel(’catalog/product’);
$product->load($productId);

$product_data = array();
$product_data['sku']=$product->getSku();
$product_data['title']=$product->getName();
$product_data['description']=$product->getDescription();
$product_data['link']=$product->getProductUrl();
$product_data['image_link']=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).’catalog/product’.$product->getImage();
$product_data['price']=$product->getPrice();
$product_data['brand']=$product->getResource()->getAttribute(’manufacturer’)->getFrontend()->getValue($product);
$product_data['product_type']=”;

//echo ‘Product load: ‘.memory_get_usage(false).’<br>’;
//flush();

//get the product categories
foreach($product->getCategoryIds() as $_categoryId){
$category = Mage::getModel(’catalog/category’)->load($_categoryId);
$product_data['product_type'].=$category->getName().’, ‘;
}
$product_data['product_type']=rtrim($product_data['product_type'],’, ‘);

//echo ‘Category load: ‘.(memory_get_usage(false)).’<br>’;

//sanitize data
foreach($product_data as $k=>$val){
$bad=array(’”‘,”\r\n”,”\n”,”\r”,”\t”);
$good=array(”",” “,” “,” “,”");
$product_data[$k] = ‘”‘.str_replace($bad,$good,$val).’”‘;
}

$feed_line = implode(”\t”, $product_data).”\r\n”;
fwrite($handle, $feed_line);
fflush($handle);

//echo ‘Loop end: ‘.memory_get_usage(false).’<br>’;
//flush();
}

//———————- WRITE THE FEED
fclose($handle);

}
catch(Exception $e){
die($e->getMessage());
}

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

Favicon - the little bookmark icon that shows up next to URL

February 16th, 2009

Just wanted to put a note to a pretty good Photoshop extension that I found as I was looking for tools to create .ico files (favicons) for my web sites. Here’s a link to download the extension from Toby Thain: http://www.telegraphics.com.au/sw/#icoformat, all it is is a simple file that you copy into the “File Formats” folder inside your Photoshop Plugins folder.

Now when you create a new icon, which is a 16px x 16px icon you can save as .ico file format in Photoshop. As to where to put this file, simply name this file favicon and drop it into the root of your web site folder.

For Wordpress, you will want to drop this into your wp-content/themes/themeName folder.

For Magento, you will want to drop you favicon file in the root Magento folder as well as: skin/frontend/default/themeName if you want to add the favicon to the admin page you will drop it here: skin/adminhtml/default/ThemeName

e-commerce, magento, technical notes, wordpress , , ,

Magento Notes - Customizing the Invoice and Packing Slip PDF

February 3rd, 2009

We just got our first online order on Tickon.com (our very own Magento-based e-commerce site)!! YEAH!!! But we weren’t even ready for order taking yet!! Paypal Pro hasn’t been setup and logistics haven’t been figured out out…yikes!!

Contacted Paypal to expedite the site approval process, and contacted our vendor with shipping the item…all done in 1 afternoon.  Everything is under control now, I was able to use Paypal’s virtual terminal to key in the CC info and all’s well!  So far.

When I was getting ready to print out the packing slip and the invoices for my vendor to ship the product, I noticed that the plain vanilla invoices and packing slips didn’t include my store’s logo nor address.  Make sure you get those on if to build your store’s brand identity!! Or atleast so that the customer knows where this package came from!

I browsed in the Magento admin interface, and looked everywhere but couldn’t find the form to fill in the store address nor an image for the outputted PDF file.  After some googling i found the thread that talks about this…and the location to configure this IS in the admin interface…just that it wasn’t placed at a very intuitive location. To customize the logo and the store address on the invoice, go to: System (at the top), Sales (on the left side), and Invoice and Packing Slip Design (third tab in the middle).  Upload the images, and type in your store address.  All Done.

NOTE: Picture shown is what was purchased. Very cool Queue 2-Tone Stick Lighter.

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

Annoying Notification Message in the Admin Page

February 2nd, 2009

Are you sick of seeing that Magento notification always showing up whenever you login to the admin page?  There’s a quick way to disable this feature…I am surprise that it was so hard to google for a solution on this. Am I the only one annoyed by that notification?!

Anyways, the quick fix is the following: go into app/code/core/Mage/Adminhtml/Block/Notification and open up the file: toolbar.php and look for the function: isShow.  If the function returns true that notification box will show up, but if it returns false, the notification will never show up.  So what I have done is change the original code:

public function isShow()
{
if ($this->getRequest()->getControllerName() == ‘notification’) {
return false;
}
if ($this->getCriticalCount() == 0 && $this->getMajorCount() == 0 && $this->getMinorCount() == 0 && $this->getNoticeCount() == 0) {
return false;
}
return true;
}

to always return false:

public function isShow()
{
return false;
}

Hope someone appreciate this fix.  I know I do.

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

Magento Quick Note - Modifying Confirmation Email Templates

January 23rd, 2009

When setting up a new Magento-based e-commerce store, one common thing that users overlook is to modify the order confirmation emails that the system sends to the customers…and many store owners don’t know to modify this until their first order is sent out to an actual customer…and guess what? that order confirmation email is gonna have the “Magento Demo Store” wording all over the place.  Couple things to look out for:

1. Update the Magento logo with your own, but replacing the logo file/name in skin/frontend/default/your template/images. File name: logo_email.gif (for all outbound emails), logo_print.gif (for logo on the pdf invoice)

2. update all the html files in: app\locale\en_US\template\email and app\locale\en_US\template\email\sales

e-commerce, magento, technical notes ,

Simple Helix - Dedicated IP dilemma

January 22nd, 2009

Just signed up for my Linux plan with Simple Helix as i’ve heard all the great things in the Magento Forum about them.  The performance is indeed excellent, my new Magento site http://www.tickon.com is very very speedy, even the backend admin pages have been quite snappy.  So definitely no complaints on the performance. PLUS it’s only a shared standard hosting $20/mo.

One big grip that i have tho…they haven’t been able to give me a dedicated IP address, and couldn’t give me an ETA on when i can get one!  So i am stuck with an awesome site that can’t take any orders b/c I can’t install SSL without a dedicated IP.

twiddling my thumbs just waiting now….i will give them 2 more days to resolve this, otherwise i am demanding a refund, as much as i don’t want to.

I was even thinking about signing up for the Reseller Program, but from the way they have handled my dedicated IP situation, i will hold off for now.

blog posting, e-commerce, magento , , ,

Magento Notes - Image not appearing after moving site to web host

January 21st, 2009

Just signed up for a Linux hosting plan with SimpleHelix.com, I must say, the performance is EXCELLENT!!  The site actually runs faster on the hosting company than my local install (WinXP + WAMP)

Just want to document an issue that I ran into when I moved my site…a lot of the images were broken…it was bizarre as when I checked..all the images were intact and they were all ftp’ed to the web host properly.  To my surprise, it was an issue with the image path being CASE SENSITIVE, it was a non-issue on my local install as Windows disregards case-sensitivity in image paths, but Linux is different.

So what ended up happening is that I have to browse through my entire product catalog, looking for missing images and trace back to which product and then lookfind the image path and file name were having issues, and then reference back to root/media/catalog/product/ to see whether the sub-folders are upper case or lower case and then modify the associated path accordingly in the mysql database table (catalog_product_entity_media_gallery).  The file structure for the image files is quite interesting, as it takes the first two characters of the image file name and creates a folder usig the first alphabet, and then create a sub-folder within using the 2nd alphabet; I find that odd but interesting.

Once the path name is updated in mysql, you would have to go back into Magento admin and reselect the base image, thumbnail, and small image, as those settings gets reset once you manually update the row entry in mysql table.

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

Magento Notes - How to modify customer dashboard

January 15th, 2009

After searching high and low to see if I can find anything related to modifying the customer dashboard, I was surprised that nobody had this request in the forum, or that most people are just so satisfied with Magento’s dashboard out of the box…by all means, it’s very very good, but every client has their unique requests….so..

The scenario deals with client wanting a section for registered users to be able to download product catalogs and price sheets, but they don’t want to make it publicly accessible by anyone who browses their web site.  So what better place to put it then in the customer dashboard (attached picture shows the desired outcome, with a “Download” section at the bottom.

To achieve, this i had to modify 2 files: dashboard.phtml under /app/design/frontend/default/yourtemplate/template/customer/account/ and also customer.xml under /app/design/frontend/default/yourtemplate/layout/, and then lastly add a separate file called download_links.phtml and save it in a newly created folder called “downloadlinks” under /app/design/frontend/default/yourtemplate/template/

In the dashboard.phtml, after line 38, simply add:

<div class=”head”>
<h4><?php echo $this->__(’Download Links’) ?></h4>
</div>
<?php echo $this->getChildHtml(’downloadlinks’) ?>

this code will sit right after the following code block:

<div class=”account-box ad-account-info”>
<div class=”head”>
<h4><?php echo $this->__(’Account Information’) ?></h4>
</div>
<?php echo $this->getChildHtml(’info’) ?>
<?php echo $this->getChildHtml(’address’) ?>

In customer.xml, simply add:

<block type=”core/template” name=”customer_download_links” as =”downloadlinks” template=”downloadlinks/download_links.phtml”/>

inside the reference block near line 209, the block that starts with “customer_account_index

Lastly in the new file: download_links.phtml, you can put in php code or just simply html, in my case, i simply added some simple URL links for now..so my block looks like:

Your downloadable files:<br/>
<a href=”">2009 Product Catalog</a><br/>
<a href=”">2009 Price Sheet</a><br/>
<a href=”">Credit Application</a><br/>

Hope someone will find this tutorial helpful.

e-commerce, magento, technical notes , ,

Magento 1.2 released before new year

January 1st, 2009

Just came across news of Magento Commerce’s latest release of Magento 1.2.0.1, time for another round of download and studying of the new and improved Magento.  Hopefully we will see a boost in site performance.

e-commerce, magento , ,

E-commerce as a service

December 29th, 2008

After countless number of projects in developing e-commerce web sites for clients, it has finally hit me that most of the small companies and entrepreneurs simply don’t have the 1) time, 2) knowledge, 3) money, 4) manpower to run and operate an e-commerce web site. A lot of the time, customers simply want to build a site, hoping that once the site is launched, orders would roll in without them having to do anything..well that may be true 10 years ago, but in today’s online landscape, having an online storefront is not much different from operating a physical brick-n-mortar store…lots of effort is required.

In order to have a good site, the store owner would need to have the following (this may serve as a good starting point for a checklist, but it is far from complete)

  1. product information (SKU #, Product Name, Product Description, Price, Inventory, Categorization)
  2. product images (the quality of the product photography essentially makes or breaks your site, if you don’t have good product photography, you may as well stop thinking about launching the site)
  3. domain name - your store should have a easy to remember web address, start searching for a domain name if you haven’t already. Yahoo domain is pretty good for finding domains, but Godaddy is cheaper to perform the registation.
  4. corporate identity - having a good logo to go along with a domain name is important in building a brand for your business; you need to make your brand memorable, and having a good logo is a good start. To say the least, it makes small stores look more professional and bigger than they actually are.
  5. web site - you will need a web developer and graphic designer to help you build out the store from idea to reality, you will need to know what you want in the site, and how the store would look like.  store looking around on sites like amazon.com, gap.com, walmart.com (some of the most popular e-commerce sites) to get a better understanding of how you want to site to look like and what features you would like to have in your site.

Once you have accomplished all the above, it is time to start thinking about promoting the site, we will talk more about web promotion in a future post.

In conclusion, there’s a lot of work required in building an e-commerce web site.  We, at Casual Commerce, understand that, and would like to offer a service in which we will take care of all the technical and tedious work that future store owners have no time to deal with.  For a monthly fee, we will offer the following:

  1. Help you register you domain name (you pay the registration fee)
  2. Help you design a corporate identity (logo, business cards, stationary headers, etc.)
  3. Build your store, incorporating the corporate identity.
  4. Product information maintenance
  5. Product photography
  6. Web site promotion
  7. Email set up
  8. Technical support related to your web site

The store owner’s job…focus on bringing in sales.  Happy E-commerce.

blog posting, e-commerce, services , ,