I'd like to offer products to a select group of folks that wouldn't be visible to the public. I also dont want them to have to register or "login" to see the item, because several of the customers will be elderly.
Does 1.5.x have any way to not make a product public...in other words, customers would need the link to the specific product id to "see" the item?
Thanks all!!
Found a solution
I have stuck it in this code
which seems to work
http://forum.opencart.com/viewtopic.php?f=22&t=6670
1.5.1.3 is slightly different1. EDIT: catalog/model/catalog/category.php
2. FIND:
Code: Select all
public function getCategories($parent_id = 0) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) WHERE c.parent_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$this->language->getId() . "' ORDER BY c.sort_order");
return $query->rows;
}
3. REPLACE WITH:
Code: Select all
public function getCategories($parent_id = 0) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd ON (c.category_id = cd.category_id) WHERE c.parent_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$this->language->getId() . "' AND c.sort_order <> '-1' ORDER BY c.sort_order");
return $query->rows;
}
Now just set the sort order to -1 for all the ones you don't want to show.
I have stuck it in this code
Code: Select all
AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "' [b]AND c.sort_order <> '-1'[/b] AND c.status = '1' ORDER BY c.sort_order, LCASE(cd.name)");
http://forum.opencart.com/viewtopic.php?f=22&t=6670
Who is online
Users browsing this forum: No registered users and 21 guests