- Posts: 12
- Thank you received: 0
Issues when listing brands products (SQL ERROR)
However I have encountered an issue.
I have a page where I list products in two categories: Make Up and Skincare. This used to work great but when I decided to add a list of brands hell broke loose.
This URL is used for displaying single products
mypage.org/products/smink/product/9-makeuptest-2
As I said this used to work great.
But then I added a Joomla module to add a list of brands with the type Hikashop Content Module. Each menu items lead to a page which displays the products in that brand category. This also works great... BUT, when I publish this module all the urls to my single product view stops working with this error:
0 - SQL=SELECT category_id FROM jypxd_hikashop_product_category WHERE product_id=9 OR product_parent_id=9
The URL that worked earlier mypage.org/products/smink/product/9-makeuptest-2 does not work anymore. If I enter a brand in the brand menu the products in that brands are listed as they should but then again when I click them:
0 - SQL=SELECT category_id FROM jypxd_hikashop_product_category WHERE product_id=2 OR product_parent_id=2
The module I've created to display brands have completely messed up all my products listning.
Here is an image of the Hikashop options for the Brand module
image missing http://ft.trillian.im/a7daeaab407fbdd5ed34f1ec113e73c93c9232f6/6fMHpmpjTtVKCQKR0HWbjCntHKmHg.jpg
Here is the Hikashop Display -> Content Menus -> Brands listing
image missing http://ft.trillian.im/a7daeaab407fbdd5ed34f1ec113e73c93c9232f6/6fMHv4X9zKTdHXj08zCV2ILmcCbWs.jpg
Anyone can tell me what is going on here?
I tried to turn SEF urls off in Joomla with no luck.
Please Log in or Create an account to join the conversation.
Category product view(this one works)
mypage.org/component/hikashop/category/18-maybelline?Itemid=104
Category product view -> Single product view(this one does not work)
mypage.org/component/hikashop/product/2-brown-lashes?Itemid=104
This link above works IF I unpublish the Brand listning module.
Please Log in or Create an account to join the conversation.
Can you enable the Joomla debug mode, and set the error reporting to maximum to have more informations about this error ?
Please Log in or Create an account to join the conversation.
Xavier wrote: Hi,
Can you enable the Joomla debug mode, and set the error reporting to maximum to have more informations about this error ?
Yes sir, right away, sir.
This error is generated when I click on a product in the product listning.
SQL=SELECT category_id FROM jypxd_hikashop_product_category WHERE product_id=9 OR product_parent_id=9
Call stack
# Function Location
1 JSite->render() /storage/content/62/112162/mypage.org/public_html/joomla/index.php:58
2 JDocumentHTML->render() /storage/content/62/112162/mypage.org/public_html/joomla/includes/application.php:279
3 JDocumentHTML->_renderTemplate() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/joomla/document/html/html.php:462
4 JDocumentHTML->getBuffer() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/joomla/document/html/html.php:682
5 JDocumentRendererModules->render() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/joomla/document/html/html.php:399
6 JDocumentRendererModule->render() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/joomla/document/html/renderer/modules.php:39
7 JModuleHelper::renderModule() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/joomla/document/html/renderer/module.php:107
8 include() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/legacy/module/helper.php:176
9 hikashop_getLayout() /storage/content/62/112162/mypage.org/public_html/joomla/modules/mod_hikashop/mod_hikashop.php:48
10 CategoryViewCategory->display() /storage/content/62/112162/mypage.org/public_html/joomla/administrator/components/com_hikashop/helpers/helper.php:667
11 CategoryViewCategory->listing() /storage/content/62/112162/mypage.org/public_html/joomla/components/com_hikashop/views/category/view.html.php:22
12 JDatabaseDriver->loadColumn() /storage/content/62/112162/mypage.org/public_html/joomla/components/com_hikashop/views/category/view.html.php:109
13 JDatabaseDriverMysql->execute() /storage/content/62/112162/mypage.org/public_html/joomla/libraries/joomla/database/driver.php:1069
Please Log in or Create an account to join the conversation.
Please replace the line:
Please Log in or Create an account to join the conversation.
nicolas wrote: Hi,
Please replace the line:with the line:Code:$query = 'SELECT category_id FROM '.hikashop_table('product_category').' WHERE product_id='.$product_id.' OR product_parent_id='.$product_id;in the file components/com_hikashop/views/category/view.html.php and that will fix the problem.Code:$query = 'SELECT category_id FROM '.hikashop_table('product_category').' WHERE product_id='.$product_id;
It did. In order to learn more I have to ask why the OR statement messed up the page?
Am also wondering why my "Category listing" module dissappear when I enter a category listing.
mypage.org/joomla/component/hikashop/cat...aybelline?Itemid=104
I understand I need to specify where to show the Hikashop module and I have done so.
The Hikashop Content Module that present the menu's have these menu assignments
Categories listing
Products listing
User control panel
Registration form
Brands listing
Also Products and all the childs.
I think because the URL is /components/hikashop/.../ I cant specify that the Hikashop Module should be visible there.
And is it possible to change the URL? /components/hikashop/category/...../ is one big url. Why not
mypage.org/products/category/maybelline-18 instead?
Please Log in or Create an account to join the conversation.
That OR statement was wrong which is why it messed up the page.
The component/hikashop part of the URL is converted by joomla's sef into the alias of the current menu item when possible.
If you see component/hikashop, it means that the current menu item is not a Hikashop type of menu item and thus joomla cannot replace it.
In short, it means that in the "menu" option of your module, you need to select a correct hikashop category listing menu item and it will then use the alias of that menu.
Actually, your issue with the module "disappearing" is probably linked to that. Since you selected a menu which is not a HikaShop menu, when the user click on a link of the module, it goes on a menu where the module is not assigned and thus the module is not displayed.
Please Log in or Create an account to join the conversation.
nicolas wrote: Hi,
The component/hikashop part of the URL is converted by joomla's sef into the alias of the current menu item when possible.
If you see component/hikashop, it means that the current menu item is not a Hikashop type of menu item and thus joomla cannot replace it.
In short, it means that in the "menu" option of your module, you need to select a correct hikashop category listing menu item and it will then use the alias of that menu.
Ok. So I added a menu item to my main menu as "Hikashop Product listning" and pointed the Hikashop Module at it. Now the URL looks good
mypage.org/produkter/varumarke/category/listing/18-maybelline
Also the products in that category are listed properly. But still the Brand menu to the left are missing inside this page :dry:
If I go to the tab "Modules Assignment for this menu Item" the module "Products Brands" which list the brands to the left is set to "Yes".
The menu is visibile in mypage.org/produkter/varumarke/ but not mypage.org/produkter/varumarke/category/*
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Actually, it's quite hard to say anything else without more information on how you setup your module (screenshot of the joomla and hikashop options) and a link to the page with the module.
Please Log in or Create an account to join the conversation.
nicolas wrote: Mmm. I checked the link you sent but I didn't see any module disappear.
Actually, it's quite hard to say anything else without more information on how you setup your module (screenshot of the joomla and hikashop options) and a link to the page with the module.
I published the modules again... bringing screens in 5 minutes. The link I sent you should now display the module.
Please Log in or Create an account to join the conversation.
Turn that option off in the module and that will work.
Please Log in or Create an account to join the conversation.
nicolas wrote: I checked the link and looking at it, it sounds that you turned on the "synchronize with content" option of the module and because of that is always tries to display the sub brands of the current brand, which is why you don't get anything when you click on a link.
Turn that option off in the module and that will work.
Hey, thank you!
image missing http://www.troll.me/images/victory-baby/i-love-you-thats-for-sure.jpg
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You will have to add a condition based on the current category to display differently the listing_div file .
Please Log in or Create an account to join the conversation.
nicolas wrote: You can also edit it via the menu Display->Views.
You will have to add a condition based on the current category to display differently the listing_div file .
Yeah, I created my listing_div2. I do not quite understand how to make this condition. Why are there so little documentation about this?
Please Log in or Create an account to join the conversation.
If you need to customize the code and you don't know how, I invite you to find a third party developer to help you on that. You can do that via our commercial jobs forum or joomlancers.com
Such small customization should be doable for a relatively small price.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.