Hello
where can I change the sorting category - last modified
Hello,slavib wrote:Hello
where can I change the sorting category - last modified
1. which OpenCart version
2. front- or backend
3. at which operation
thx
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
I made this mod but it did not work
Work on first load.
But does not work in case of sort
please help
Work on first load.
But does not work in case of sort
please help
Code: Select all
<modification>
<name>Sort Last modified</name>
<version>1.0.0</version>
<link>http://dreams-bg.com</link>
<author>Computer Dreams</author>
<code>sort_last_modified_ocmod</code>
<file path="catalog/controller/product/category.php">
<operation>
<search ><![CDATA[$sort = 'p.sort_order';]]></search>
<add position="replace"><![CDATA[
$sort = 'p.date_modified';
]]></add>
</operation>
<operation>
<search ><![CDATA[$order = 'ASC';]]></search>
<add position="replace"><![CDATA[
$order = 'DESC';
]]></add>
</operation>
<operation>
<search index="1" ><![CDATA[$data['sorts'][] = array(]]></search>
<add position="before"><![CDATA[
$data['sorts'][] = array(
'text' => $this->language->get('text_date_modified_asc'),
'value' => 'p.date_modified-ASC',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.date_modified&order=ASC' . $url)
);
$data['sorts'][] = array(
'text' => $this->language->get('text_date_modified_desc'),
'value' => 'p.date_modified-DESC',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.date_modified&order=DESC' . $url)
);
]]></add>
</operation>
</file>
<file path="catalog/language/english/product/category.php">
<operation>
<search ><![CDATA[$_['text_model_desc'] = 'Model (Z - A)';]]></search>
<add position="after"><![CDATA[
$_['text_date_modified_desc']= 'Newestmod > Oldestmod';
$_['text_date_modified_asc'] = 'Oldestmod > Newestmod';
]]></add>
</operation>
</file>
<file path="catalog/model/catalog/product.php">
<operation>
<search><![CDATA['p.sort_order',]]></search>
<add position="after"><![CDATA[
'p.date_modified',
]]></add>
</operation>
</file>
</modification>
Who is online
Users browsing this forum: No registered users and 50 guests