Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Подружить новую версию OCFilter и модуль Product Status Extended


Recommended Posts

Собственно всё в заголовке написано.
Ссылка на PSE модуль вот:

В ветке 4.7.5.х было два подзапроса
 

	<file path="catalog/model/extension/module/ocfilter.php">
		<operation error="skip">
			<search><![CDATA[$sql .= " WHERE p.status = '1']]></search>
			<add position="before"><![CDATA[$sql .= " LEFT JOIN " . DB_PREFIX . "stock_status s2p ON (p.stock_status_id = s2p.stock_status_id)";]]></add>
		</operation>
		<operation error="skip">
			<search><![CDATA[$sql .= " WHERE p.status = '1']]></search>
			<add position="replace"><![CDATA[$sql .= " WHERE IF (s2p.in_archive = '1',  p.quantity != '0' AND p.status = '1',  p.status = '1') ]]></add>
		</operation>
	</file>


В новой не понятно, что куда.
Предложения в личку или сюда.

Link to comment
Share on other sites

<file path="catalog/model/extension/module/ocfilter.php">
  <operation error="skip">
    <search><![CDATA[return str_replace('{prefix}', $this->db->escape($prefix), implode(" ", $sql));]></search>
    <add position="before"><![CDATA[$sql[] = "LEFT JOIN " . DB_PREFIX . "stock_status s2p ON ({prefix}stock_status_id = s2p.stock_status_id)";]]></add>
  </operation>
  <operation error="skip">
    <search><![CDATA[$sql[] = "{prefix}status = '1'";]]></search>
    <add position="replace"><![CDATA[$sql[] = "IF(s2p.in_archive = '1', {prefix}quantity != '0' AND {prefix}status = '1', {prefix}status = '1')";]]></add>
  </operation>
</file>

 

Link to comment
Share on other sites

25 минут назад, SooR сказал:
<file path="catalog/model/extension/module/ocfilter.php">
  <operation error="skip">
    <search><![CDATA[return str_replace('{prefix}', $this->db->escape($prefix), implode(" ", $sql));]></search>
    <add position="before"><![CDATA[$sql[] = "LEFT JOIN " . DB_PREFIX . "stock_status s2p ON ({prefix}stock_status_id = s2p.stock_status_id)";]]></add>
  </operation>
  <operation error="skip">
    <search><![CDATA[$sql[] = "{prefix}status = '1'";]]></search>
    <add position="replace"><![CDATA[$sql[] = "IF(s2p.in_archive = '1', {prefix}quantity != '0' AND {prefix}status = '1', {prefix}status = '1')";]]></add>
  </operation>
</file>

 

Спасипотому что огромное!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.