Answer the question
In order to leave comments, you need to log in
Doesn't show the characteristics of the product card in OpenCart?
The site supports 3 languages (Russian, English, Georgian) There was a problem in this
In the product card, in the Georgian version, the Characteristics tab is missing.
At the same time, if I switch this page to Russian or English, then the "Characteristics" tab is visible
.
<a href="#tab-specification" data-toggle="tab" aria-expanded="true" style="background-color: rgb(255, 255, 255); color: rgb(119, 119, 119); border-color: rgb(119, 119, 119);">Характеристики</a>
Answer the question
In order to leave comments, you need to log in
attributes are selected by 2 parameters $product_id and $this->config->get('config_language_id')
$product_attribute_group_query = $this->db->query("SELECT ag.attribute_group_id, agd.name FROM " . DB_PREFIX . "product_attribute pa LEFT JOIN " . DB_PREFIX . "attribute a ON (pa.attribute_id = a.attribute_id) LEFT JOIN " . DB_PREFIX . "attribute_group ag ON (a.attribute_group_id = ag.attribute_group_id) LEFT JOIN " . DB_PREFIX . "attribute_group_description agd ON (ag.attribute_group_id = agd.attribute_group_id) WHERE pa.product_id = '" . (int)$product_id . "' AND agd.language_id = '" . (int)$this->config->get('config_language_id') . "' GROUP BY ag.attribute_group_id ORDER BY ag.sort_order, agd.name");
foreach ($product_attribute_group_query->rows as $product_attribute_group) {
$product_attribute_data = array();
$product_attribute_query = $this->db->query("SELECT a.attribute_id, ad.name, pa.text FROM " . DB_PREFIX . "product_attribute pa LEFT JOIN " . DB_PREFIX . "attribute a ON (pa.attribute_id = a.attribute_id) LEFT JOIN " . DB_PREFIX . "attribute_description ad ON (a.attribute_id = ad.attribute_id) WHERE pa.product_id = '" . (int)$product_id . "' AND a.attribute_group_id = '" . (int)$product_attribute_group['attribute_group_id'] . "' AND ad.language_id = '" . (int)$this->config->get('config_language_id') . "' AND pa.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY a.sort_order, ad.name");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question