Post by palkema » Thu Dec 31, 2009 12:24 am

When specifying a special price for a specific product, the price does actually change, however the google base feature does not display this change. It display's the normal price.

I believe this to be a bug.

Newbie

Posts

Joined
Thu Dec 31, 2009 12:22 am

Post by Xsecrets » Thu Dec 31, 2009 12:56 am

edit catalog/controller/feed/google_base.php

find

Code: Select all

$output .= '<g:price>' . $this->tax->calculate($product['price'], $product['tax_class_id']) . '</g:price>';
and replace it with

Code: Select all

$special = $this->model_catalog_product->getProductSpecial($product['product_id']);
					if($special) {
						$output .= '<g:price>' . $this->tax->calculate($special, $product['tax_class_id']) . '</g:price>';
					} else {
						$output .= '<g:price>' . $this->tax->calculate($product['price'], $product['tax_class_id']) . '</g:price>';
					}
that should work.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by palkema » Thu Dec 31, 2009 5:26 am

Works great, thanks.

Newbie

Posts

Joined
Thu Dec 31, 2009 12:22 am

Post by speedingorange » Mon Mar 15, 2010 9:51 pm

Have tried this and am getting a bit of a glitch, double pricing. The correct price is added into the item title and the old non special offer price is listed as the searchable price on google.

Example: http://www.google.co.uk/products?q=sabr ... t054&hl=en

any one any ideas? really need to sort this as its becoming a bit of a nuisance.

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm

Post by speedingorange » Tue Apr 27, 2010 4:40 pm

just revisiting an issue i'm having, could anyone pinpoint where the error is in this page that is preventing the special price being sent through to the .rss feed?

Code: Select all

					
					    $special = $this->model_catalog_product->getProductSpecial($product['product_id']);
                   if($special) {
                      $output .= '<g:price>' . $this->tax->calculate($special, $product['tax_class_id']) . '</g:price>';
                   } else {    $special = $this->model_catalog_product->getProductSpecial($product['product_id']);
                   if($special) {
                      $output .= '<g:price>' . $this->tax->calculate($special, $product['tax_class_id']) . '</g:price>';
                   } else {
                      $output .= '<g:price>' . $this->tax->calculate($product['price'], $product['tax_class_id']) . '</g:price>';
                   }
                   }
					

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm
Who is online

Users browsing this forum: No registered users and 14 guests