Products Not Displaying

  • Posts: 16
  • Thank you received: 0
9 years 8 months ago #226009

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.6.1

I am having issues with my products displaying. I am using joomlaman creatrix template which was designed to work with hikashop but none of my products are visible with that template. I have tested with other templates and all products show. All my categories will show in the creatrix template but when you click on them it takes you to a white screen. Has anyone had this issue before that might have some insight?
Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 8 months ago #226011

Hi,

If you have a white screen ; it can be a PHP fatal error.
To check it, you should look in your PHP error log or you can activate temporally the "error reporting" to "maximum" in your Joomla global configuration.
With the error message, it will be easier to understand the issue.
But regarding what you describe, it might have an error between an override in the template and HikaShop 2.6

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 0
9 years 8 months ago #226073

Thank you. There are no errors showing in the php. The only thing I can think of is a template issue.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #226077

Hi,

Via the menu Display > Views in the backend of HikaShop, you can try to backup and remove the editions of the edited views.
www.hikashop.com/support/documentation/s...ize-the-display.html

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 0
9 years 8 months ago #226242

I have found two products that will display it says HikaShop Content Module at the top of the page and when I click on the product I get this fatal error
Call to undefined function bccomp() in /var/www/vhosts/bmssanitation.ca/httpdocs/administrator/components/com_hikashop/classes/product.php on line 2531

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #226289

Hi,

As Jérome answered by email:

bccomp is a PHP function provided by the BC math library.
php.net/manual/en/function.bccomp.php

Since PHP 4.0.4, that function is included in PHP
php.net/manual/en/bc.requirements.php
But it looks like your PHP does not include that math library.
So I would recommend to check with your hosting company or system administrator why this function is missing even though your version of PHP should have it included.

In the file "administrator/components/com_hikashop/helpers/helper.php", please add at the end :

if(!function_exists('bccomp')) {
function bccomp($num1, $num2, $scale = 0) {
// check if they're valid positive numbers, extract the whole numbers and decimals
if(!preg_match("/^\+?(\d+)(\.\d+)?$/", $num1, $tmp1) || !preg_match("/^\+?(\d+)(\.\d+)?$/", $num2, $tmp2))
return 0;
// remove leading zeroes from whole numbers
$num1 = ltrim($tmp1[1], '0');
$num2 = ltrim($tmp2[1], '0');
// first, we can just check the lengths of the numbers, this can help save processing time
// if $num1 is longer than $num2, return 1.. vice versa with the next step.
if(strlen($num1) > strlen($num2))
return 1;
if(strlen($num1) < strlen($num2))
return -1;
// If the two numbers are of equal length, we check digit-by-digit
// Remove ending zeroes from decimals and remove point
$dec1 = isset($tmp1[2]) ? rtrim(substr($tmp1[2], 1), '0') : '';
$dec2 = isset($tmp2[2]) ? rtrim(substr($tmp2[2], 1), '0') : '';
// If the user defined $Scale, then make sure we use that only
if($scale != null) {
$dec1 = substr($dec1, 0, $scale);
$dec2 = substr($dec2, 0, $scale);
}
// calculate the longest length of decimals
$DLen = max(strlen($dec1), strlen($dec2));
// append the padded decimals onto the end of the whole numbers
$num1 .= str_pad($dec1, $DLen, '0');
$num2 .= str_pad($dec2, $DLen, '0');
// check digit-by-digit, if they have a difference, return 1 or -1 (greater/lower than)
for($i = 0; $i < strlen($num1); $i++) {
if((int)$num1{$i} > (int)$num2{$i})
return 1;
if((int)$num1{$i} < (int)$num2{$i})
return -1;
}
// if the two numbers have no difference (they're the same).. return 0
return 0;
}
}


And that will fix the problem temporarily. But you'll get it again next time you update so it would still be interesting to contact your hosting company in order to understand what's going on.

The following user(s) said Thank You: sarahshaw

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 0
9 years 8 months ago #226311

Thank you for your response. I have contacted my hosting company and they have said they would add the module for me but it could take some time as they need to restart the server.

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum