Shop for Exclusive d.o.o.
Posted by admin in myPortfolio
url: www.exclusive.si
made with: osCommerce, HTML, CSS, JavaScript, PHP
osCommerce: Add category and product name in title tag
Posted by admin in osCommerce, tips
I’m doing search engine optimization for a shop powered by osCommerce. Title tags are very important for that, so I wanted it to look like this: Shop name :: Category name :: Product name.
If you are using STS (Simple Template System) use:
- Open file
/catalog/includes/modules/sts_inc/general.php - Find line:
$sts->template[’headertags’]= “<title>” . TITLE .”</title>”;
and replace it with:
// BOF add category and product name in title tag
$product_title_query = tep_db_query(”select pd.products_name, pd.products_description from ” . TABLE_PRODUCTS . ” p, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_id = ‘” . (int)$HTTP_GET_VARS[’products_id’] . “‘ and pd.products_id = p.products_id and pd.language_id = ‘” . (int)$languages_id . “‘”);
$product_title = tep_db_fetch_array($product_title_query); // get product name$category_query = tep_db_query(”select cd.categories_name, c.categories_image from ” . TABLE_CATEGORIES . ” c, ” . TABLE_CATEGORIES_DESCRIPTION . ” cd where c.categories_id = ‘” . (int)$current_category_id . “‘ and cd.categories_id = ‘” . (int)$current_category_id . “‘ and cd.language_id = ‘” . (int)$languages_id . “‘”);
$category = tep_db_fetch_array($category_query); // get category name$sts->template[’headertags’]= “<title>” . TITLE . ” :: ” . $category[’categories_name’] . ” :: ” . $product_title[’products_name’] . “</title>”;
// EOF add category and product name in title tag - Upload the file and you’re done!
If you are using basic osCommerce use:
- Open file
/catalog/index.php - Find line:
<title><?php echo TITLE; ?></title>
and replace it with:
<?php // BOF add category and product name in title tag
$product_title_query = tep_db_query(”select pd.products_name, pd.products_description from ” . TABLE_PRODUCTS . ” p, ” . TABLE_PRODUCTS_DESCRIPTION . ” pd where p.products_id = ‘” . (int)$HTTP_GET_VARS[’products_id’] . “‘ and pd.products_id = p.products_id and pd.language_id = ‘” . (int)$languages_id . “‘”);
$product_title = tep_db_fetch_array($product_title_query); // get product name$category_query = tep_db_query(”select cd.categories_name, c.categories_image from ” . TABLE_CATEGORIES . ” c, ” . TABLE_CATEGORIES_DESCRIPTION . ” cd where c.categories_id = ‘” . (int)$current_category_id . “‘ and cd.categories_id = ‘” . (int)$current_category_id . “‘ and cd.language_id = ‘” . (int)$languages_id . “‘”);
$category = tep_db_fetch_array($category_query); // get category name
?>
<title><?php echo TITLE . ” :: ” . $category[’categories_name’] . ” :: ” . $product_title[’products_name’]; ?></title> - Do the same for file
/catalog/product_info.php - Upload files and that’s it!
Note: Page title (TITLE) is found in your language file (for example: /catalog/includes/language/english.php)
Usefull links
Posted by admin in link
- Templates
Web Templates from BoxedArt - Features website templates, flash templates, logo templates, templates, flash intros, full flash ites, PHP Nuke templates.
Url: www.boxedart.com
How to find your absolute server path
Posted by admin in tips
- Create new php file (let’s say you name it
abspath.php). - Insert this code in that file:
<?php
$abspath = getcwd();
echo $abspath;
?> - Upload the file with FTP to the root directory of your site.
- Run
http://www.your-domain.com/abspath.phpin browser and you will get your absolute server path.
Website for Gasilska enota Nova Gorica
Posted by admin in myPortfolio
Client: Gasilska enota Nova Gorica (Fire department)
Production: Carpediem d.o.o.
url: www.geng.si
made with: Wordpress, HTML, CSS, PHP
Website for Veverin.com
Posted by admin in myPortfolio
Client: Top.Sel Edbin Skok s.p.
Production: Carpediem d.o.o.
url: www.veverin.com
made with: Joomla, HTML, CSS, JavaScript, PHP
Shop for AVIM l.t.d
Posted by admin in myPortfolio
Client: AVIM l.t.d.
Production: Carpediem d.o.o.
url: www.darilo.si
made with: osCommerce, HTML, CSS, JavaScript, PHP
osCommerce - Your Shopping Cart is empty!
Posted by admin in osCommerce, tips
I installed Ultimate SEO contribution to my osCommerce shop. Then i noticed, if I click on ‘Buy now’ button from product listing page, I get ‘Your Shopping Cart is empty!’ page. That’s not good for business right, so I had to fix the problem. So to do that, open /includes/modelus/product_listing.php and find code:
$lc_text = ‘<a href=”‘ . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array(’action’)) . ‘action=buy_now&products_id=’ . $listing[’products_id’]) . ‘”>’ . tep_image_button(’button_buy_now.gif’, IMAGE_BUTTON_BUY_NOW) . ‘</a> ‘;
and repleace it with:
$lc_text = ‘<a href=”‘ . tep_href_link(basename($PHP_SELF), ‘action=buy_now&products_id=’ . $listing[’products_id’]) . ‘”>’ . tep_image_button(’button_buy_now.gif’) . ‘</a> ‘;
Website for Idrija Tourism
Posted by admin in myPortfolio
Client: Idrija Tourism (TIC Idrija)
Production: Carpediem d.o.o.
url: www.idrija-turizem.si
made with: Joomla, HTML, CSS, JavaScript, PHP
Website for Športni zavod Nova Gorica
Posted by admin in myPortfolio
Client: Športni zavod Nova Gorica
Production: Carpediem d.o.o.
url: http://www.sz-ng.si/
made with: Joomla, HTML, CSS, JavaScript, PHP


