One thing I am confused about is the seo urls and couldn't find an answer by googling. While I love that I can make the seo keywords unique by store if I want to, if I only have one set for default and later add that product to one of my other stores, will the other store use the default seo url if I forget to set one for the store? Or will it show up in the 2nd store with the non-seo path product_id etc??
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
1) to translate from keywords to get variables it uses:
Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "seo_url WHERE keyword = '" . $this->db->escape($part) . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "'");
Read somewhere long time ago that that was as a failsafe which is nonsense and a mistake in my view.
Still, you could change that to:
Code: Select all
$query = $this->db->query(
"SELECT *
FROM " . DB_PREFIX . "seo_url
WHERE keyword = '" . $this->db->escape($part) . "'
AND (store_id = '" . (int)$this->config->get('config_store_id') . "' OR store_id = 0)
ORDER BY store_id DESC"
);
So chances are it could find 2 occurrences so we sort them to pick the current store over the default one.
2) to translate get variables to keywords it uses several depending on the route:
Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "seo_url WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "' AND store_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "'");
you could use the same principle:
Code: Select all
$query = $this->db->query(
"SELECT *
FROM " . DB_PREFIX . "seo_url
WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "'
AND (store_id = '" . (int)$this->config->get('config_store_id') . "' OR store_id = 0)
AND language_id = '" . (int)$this->config->get('config_language_id') . "'
ORDER BY store_id DESC"
);
you can do the same for the remaining category query.
I have not tested this as I do not have multiple stores but it is a peanut change.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Users browsing this forum: No registered users and 74 guests