Post by muzik » Wed Jul 25, 2018 11:46 pm

Hello,

I am using opencart 1.5.6.4 and I have journal 2 theme....My discount module is [discount_pack.xml 1.3. Jorim van Hove]

When I add a manufacturer discount for last users it's starting to belowing query. So my host suspend my domain. Because of thousend query working in 10 minute... Any idea and hep for this?

Thank you

SELECT DISTINCT *, pd.name AS name, p.image, a.name AS author, m.name AS manufacturer, (SELECT price FROM oc_product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '1' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM oc_product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '1' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, (SELECT points FROM oc_product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '1') AS reward, (SELECT ss.name FROM oc_stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '2') AS stock_status, (SELECT wcd.unit FROM oc_weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '2') AS weight_class, (SELECT lcd.unit FROM oc_length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '2') AS length_class, (SELECT AVG(rating) AS total FROM oc_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM oc_review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN oc_author a ON (p.author_id = a.author_id) LEFT JOIN oc_manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '951' AND pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0'\G

Newbie

Posts

Joined
Wed Jul 25, 2018 11:33 pm

Post by straightlight » Fri Jul 27, 2018 1:02 am

At this point, it would rather be suggested to find an extension on the Marketplace that can resolved this issue or to upgrade your store to a recent OC release to resolved this issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Fri Jul 27, 2018 2:36 am

... upgrade your store to a recent OC release to resolved this issue
Well, this would probably solve your Problem, since your Extension(s) would no
longer be working in the new OC 3.1.x release anyway. ::) Among everything else.
But to settle with something below, means, to soon be confronted with a fast
spreading lack of knowledge, since many do not care much about so-called
'outdated' Versions anymore ... :choke: (for free, at least)
But did you ever try to switch to the Default Theme, to find out, if it then works? It
could be easier, compared with starting it all up from scratch again. ;)
Ernie
Last edited by IP_CAM on Fri Jul 27, 2018 2:40 am, edited 1 time in total.

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by straightlight » Fri Jul 27, 2018 2:39 am

to soon be confronted with a spreading
lack of knowledge
To whom does that refer exactly?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by IP_CAM » Fri Jul 27, 2018 2:53 am

with a spreading lack of knowledge - To whom does that refer exactly?
Well, to those, looking for assistance, by Nature of things. ??? But I did not count
the amount of postings, where Posters have been encouraged to upgrade, instead
of getting a useful reply to their matters. It so partly has been left to some, like me, with
a rather limited knowledge on much, trying, to be of help. Otherways, I would probably
be around 3K postings, instead of 9.6 K already :crazy:
And that's, what I call: a spreading lack of knowledge, how else could it be described?
Ernie
PS: And it will keep, to go on this way, I bet, soon, OC 3.0.x Users will be confronted with
exactly the same arguments, as they have been mentioned, many times already.

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 6 guests