Hi,
I've just realised that disabled products are included in the Google Sitemap Feed, but I don't want Google knowing about products that are disabled as if someone tries to visit them they won't find the product anyway.
Ideally i'd like to modify the sitemap generator so that it says 'if not disabled, include it in the feed' but how and where would I put this in the code?
I hope someone can help as I've been Googling for ages and not been able to find an answer.
Regards,
Rob
I've just realised that disabled products are included in the Google Sitemap Feed, but I don't want Google knowing about products that are disabled as if someone tries to visit them they won't find the product anyway.
Ideally i'd like to modify the sitemap generator so that it says 'if not disabled, include it in the feed' but how and where would I put this in the code?
I hope someone can help as I've been Googling for ages and not been able to find an answer.
Regards,
Rob
Hi, I note same issue. Using my CLIENT BOT PROMOTER FOR TWITTER http://www.fcsites.com/palabra-de-webma ... r-twitter/ note:
As I see, the query is called in catalog/controller/feed/google_sitemap.xml
related with the query in catalog/model/catalog/product so, main query is:
so, just modify this query with "WHERE p.status = '1' AND"
Voila!
This should not affect the main site product listing.
Tested on 1.5.6.4 at March 25, 2015
Code: Select all
$products = $this->model_catalog_product->getProducts();
Code: Select all
$sql = "SELECT p.product_id, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$customer_group_id . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$customer_group_id . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special";
Code: Select all
$sql = "SELECT p.product_id, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE p.status = '1' AND r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$customer_group_id . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$customer_group_id . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special";
This should not affect the main site product listing.
Tested on 1.5.6.4 at March 25, 2015
Pedro Martin - websitesbuilder.com.au
Checkout my free extensions: https://www.opencart.com/index.php?rout ... r=comprido
VQMod version at http://www.opencart.com/index.php?route ... n_id=21532
Pedro Martin - websitesbuilder.com.au
Checkout my free extensions: https://www.opencart.com/index.php?rout ... r=comprido
Hi,
I was so excited when found this extension, however it didn't work on my website.
I'm using OC 1.5.6.1 and Journal 2 theme.
Would appropriate any help solving this issue!
Thanks!
I was so excited when found this extension, however it didn't work on my website.
I'm using OC 1.5.6.1 and Journal 2 theme.
Would appropriate any help solving this issue!
Thanks!
OpenCart SEO Services
http://tomeda.bg
Who is online
Users browsing this forum: No registered users and 9 guests