Variants for some products not showing in frontend
12 years 1 month ago - 12 years 1 month ago #167959
by iedwards
Variants for some products not showing in frontend was created by iedwards
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.2.4
-- PHP version -- : 5.3.1
-- Browser(s) name and version -- : Firefox 31.0
-- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in .....httpdocs\administrator\components\com_hikashop\classes\product.php on line 613
I am building a shop with products and variants, I have some products where the variants show correctly in the front end and others where they don't appear at all, but from the administrator view the variants are all there and appear to be configured exactly the same in both cases.
The only error message I get appears when I click on manage variants in admin....
Notice: Trying to get property of non-object in E:\wamp\www\apj315\httpdocs\administrator\components\com_hikashop\classes\product.php on line 613
the message is repeated over 100 times before the variants are listed, but the variant listing appears to be correct and when I edit each variant the information is all correct.
I am using template over rides for the product display but f I remove the over ride the problem is still there, what I have found is that if I comment out the line ...
in show_block_charcteristic.php the variants are all listed correctly, but then the parent product is listed amongst the variants which is not correct.
The product data was originally imported from Virtuemart. My shop is currently on Hikashop 2.3.2 but this has been upgraded since the products were imported, and as I say some products show their variants correctly. I have auto generation of variants switched off, although when I first installed the shop it was switched on.
I don't want to have to manually recreate all the variants as there are a lot of them.
What could be going on?
Many thanks,
Ian
-- Joomla version -- : 3.2.4
-- PHP version -- : 5.3.1
-- Browser(s) name and version -- : Firefox 31.0
-- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in .....httpdocs\administrator\components\com_hikashop\classes\product.php on line 613
I am building a shop with products and variants, I have some products where the variants show correctly in the front end and others where they don't appear at all, but from the administrator view the variants are all there and appear to be configured exactly the same in both cases.
The only error message I get appears when I click on manage variants in admin....
Notice: Trying to get property of non-object in E:\wamp\www\apj315\httpdocs\administrator\components\com_hikashop\classes\product.php on line 613
the message is repeated over 100 times before the variants are listed, but the variant listing appears to be correct and when I edit each variant the information is all correct.
I am using template over rides for the product display but f I remove the over ride the problem is still there, what I have found is that if I comment out the line ...
Code:
if(isset($variant->map)) continue; //do not display variants dynamically generated because not in the database
The product data was originally imported from Virtuemart. My shop is currently on Hikashop 2.3.2 but this has been upgraded since the products were imported, and as I say some products show their variants correctly. I have auto generation of variants switched off, although when I first installed the shop it was switched on.
I don't want to have to manually recreate all the variants as there are a lot of them.
What could be going on?
Many thanks,
Ian
Last edit: 12 years 1 month ago by iedwards.
Please Log in or Create an account to join the conversation.
12 years 1 month ago - 12 years 1 month ago #167989
by iedwards
Replied by iedwards on topic Variants for some products not showing in frontend
I think I've now found a clue to the problem, somewhere along the line I seem to have created characteristics which have been associated with products and then deleted, so they no longer appear in the characteristics table, but the 'variant_characteristic_id' is still associated with the 'variant_product_id' in the variants table. Manually deleting these "ghost" characteristic_id's from the database results in all the variants being listed properly.
Ian
Ian
Last edit: 12 years 1 month ago by iedwards.
Please Log in or Create an account to join the conversation.
12 years 1 month ago #168015
by nicolas
Replied by nicolas on topic Variants for some products not showing in frontend
Yes, if the data between the variants/characteristics/products is not correct the system won't be able to display them properly. And the saving process of the product edition has several checks to clean the data between them.
Please Log in or Create an account to join the conversation.
12 years 1 month ago #168109
by iedwards
Replied by iedwards on topic Variants for some products not showing in frontend
Thank you for the reply Nicolas,
It would appear there aren't enough checks though as these characteristics were not visible via Hikashop admin and there was nothing I could do editing or saving the products that would make them display. It was only by directly accessing the database that I have been able to resolve this.
Ian
the saving process of the product edition has several checks to clean the data between them.
It would appear there aren't enough checks though as these characteristics were not visible via Hikashop admin and there was nothing I could do editing or saving the products that would make them display. It was only by directly accessing the database that I have been able to resolve this.
Ian
Please Log in or Create an account to join the conversation.
12 years 1 month ago #168119
by nicolas
Replied by nicolas on topic Variants for some products not showing in frontend
Hi,
Yes, we can't cope with everything. But still, we're going to improve the product edition interface in the future and completely redo the characteristic/variant interfaces so it should be better at handling strange data by then.
Yes, we can't cope with everything. But still, we're going to improve the product edition interface in the future and completely redo the characteristic/variant interfaces so it should be better at handling strange data by then.
The following user(s) said Thank You: iedwards
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds