CREATE TABLE r7dq_product_cat_level AS
SELECT product_id,
r7dq_product_to_category.category_id
FROM r7dq_product_to_category
LEFT JOIN r7dq_category_path ON r7dq_category_path.category_id = r7dq_product_to_category.category_id
WHERE r7dq_category_path.path_id = r7dq_category_path.category_id
But when i make some changes in my product edit page (adding a new category for example), my new table is not updating automatically.
I'm not very good at coding so if you could help me that would be great.
What code lines do i have to write in my product.php to force that update before getting the data ?
Thank you !
My OC version : 3.0.3.6
You can, either, create a new service request in the Commercial Support section of the forum, or contact an Opencart partner by using the Resources link at the top of the site, or contact me directly via PM to get this done as a custom job.I'm not very good at coding so if you could help me that would be great.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
"I'm not very good at coding" doesn't mean that i don't want to learn.
I'm sure it's nothing more than one or two code lines.
i thought that i could find some free help here...
Are you really expecting free Support on this far from default Install ?Re: Custom field - Choice list
Not very familiar with that, sorry.
My OC version : 3.0.3.6 + Multi vendor marketplace module + Journal 3 theme

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
That may also mean that you may want to benefit from people for free."I'm not very goog at coding" doesn't mean that i don't want to learn.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
not been created, to offer assistance, if one uses commercially obtained Mods.
Especially when it comes to very comprehensive Code like Journal. In addition
to the well known Fact, that many come here, using a stolen Edition of Journal,
and then expect honest People, to eventually assist them, even for free ...

And to avoid Problems, they just don't mention, what they use in detail on Mods.
But honest Business just does not work this way, like it or not ...

Good Luck !
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
My question has nothing to do with it !!
I've created a simple table using SQL code that doesn't udpdate, that's all
Moreover my version of Journal is not a stolen one. I've paid for it and when i have questions about it, i contact the Journal support.
Regardless of Journal, in this scenario, you're posting about custom codes where these requests should be handled commercially. Forum supporters assists and guides OP users where they need to go but they don't have to assist OP users for custom codes, especially for free, in any case. These guidelines are also implicit in the forum rules.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
As per your added text, since you're also using Journal, contact Journal support for custom jobs with their themes or create a new service request in the Commercial Support section of the forum to accomplish what you need in order to complete this task as a custom job.Moreover my version of Journal is not a stolen one. I've paid for it and when i have questions about it, i contact the Journal support.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I'll find another way to solve my little problem.
Some other forums or openclass sites are full of helpfull people.
I didn't know that this forum was only for commercial purpose.
Bye
No problem, goodbye.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I think the others have been a bit harsh.
If you are prepared to wait, sometimes some kind soul will actually write a lot of code and paste it here but please understand many of us make a living by writing code and we don't want the forum to become a free work requests forum.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thank you all for having explained me what this forum is made for. I was just a bit naive.
I thought that i've bought enough custom modules in your marketplace to get a bit of help here. I was wrong.
Just think that sometimes a free help for starting can lead to a commercial business... You've just lost a potential customer for the future (maybe more...).
Cheers.
Potential would be a big word, in this case, due to the contributions you may not have provided yourself in order to convince others to lead your projects into commercial business. There's a difference when these scenarios comes across.Just think that sometimes a free help for starting can lead to a commercial business... You've just lost a potential customer for the future (maybe more...).
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
If you found it why not to share your knowledge with others too


Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature
Yes, you're right.If you found it why not to share your knowledge with others too
So here is the solution i found. Instead of creating a new table in my database with SQL code and looking for a solution to update it, i've created a function which gets the data i need from the two existing tables :
public function getCategories($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_category p2c LEFT JOIN " . DB_PREFIX . "category_path cp ON (p2c.category_id = cp.category_id) WHERE cp.level = 1 AND cp.category_id = cp.path_id AND p2c.product_id = '" . (int)$product_id . "'");
return $query->rows;
}
Just 4 lines of code.... nothing more.
Just tell me how much would it have cost me to pay someone to do that ?
Better to create an Event model to do that. As for the cost, it would depend on the assigned user doing the task for you.PMAGO wrote: ↑Thu Nov 12, 2020 11:11 pmYes, you're right.If you found it why not to share your knowledge with others too
So here is the solution i found. Instead of creating a new table in my database with SQL code and looking for a solution to update it, i've created a function which gets the data i need in the two existing tables :
public function getCategories($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_category p2c LEFT JOIN " . DB_PREFIX . "category_path cp ON (p2c.category_id = cp.category_id) WHERE cp.level = 1 AND cp.category_id = cp.path_id AND p2c.product_id = '" . (int)$product_id . "'");
return $query->rows;
}
Just 4 lines of code.... nothing more.
Just tell me how much would it have cost me to pay someone to do that ?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 2 guests