Author Topic: Improving click through for google product search using page title  (Read 6437 times)

filterit

  • Jr. Member
  • **
  • Posts: 147
Re: Improving click through for google product search using page title
« Reply #15 on: December 28, 2009, 14:06:36 pm »
Got the discount working in the title now, but does not work for % yet ;-)

Code: [Select]
case 'shop.product_details':
$q = "SELECT #__vm_product.product_id, #__vm_product.product_name, #__vm_product.product_s_desc, #__vm_product_price.product_price, #__vm_product_discount.amount FROM #__vm_product LEFT JOIN #__vm_product_discount on #__vm_product.product_discount_id = #__vm_product_discount.discount_id LEFT JOIN   #__vm_product_price ON #__vm_product.product_id = #__vm_product_price.product_id WHERE #__vm_product.product_id = %s";
 $database->setQuery( sprintf( $q, $product_id ) );
    $row = null;
    $row = $database->loadObject();
    $catDesc = '';
    $catList = vm_sef_get_category_title( $database, $catDesc, $category_id, $option, $shLangName );
    if ($row) {
      $shCustomTitleTag = $row->product_name.' £'.number_format($row->product_price-$row->amount,2).' your message here';
      $shCustomDescriptionTag = $row->product_s_desc;
        $shCustomKeywordsTag = $row->product_name.', '.($catList ? str_replace('|', ',', $catList).',':'');
        $shCustomRobotsTag = 'index, follow';