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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


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.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


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?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


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.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


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 44 guests