3

I have a Magento 1.9 store and we're trying to implement a multi store set up on it as we're in the UK and we want to cater for the US market too. I've installed the Mageworx Store & Currency Auto Switcher, and so far the extension works. If it detects a user from the USA, it switches the store to a different view.

But here lies the problem. If I'm viewing the site from the UK I have access to all the products like I should do. The site is the same as it was before we implemented the store auto switcher. Here's a screenshot of it in action.

enter image description here

However, when I switch to a US IP address, no products appear. Here's a screenshot to show what I mean:

enter image description here

Both screenshots are from the same product page.

I have reindexed the store multiple times, using the Admin panel and through the shell in the command line. I've cleared the cache in a similar fashion. All of the products are set to be visible on both sites too as well as the categories.

One interesting thing I have noted is that if I go to the product page directly when on the UK side I get the full product page (like normal), as seen here:

enter image description here

However, if I visit this product while using a US IP address (meaning the store should switch) I get the following screen:

enter image description here

So for whatever reason the moment products are viewed on the US side, the website does switch to the view/store it should switch to but the products aren't displayed.

It's an usual issue, and I can't seem to find any errors within the log files. I've re-indexed, cleared the cache, and made sure the categories and products are set to be enabled for both sites. I've even disabled and enabled products and categories and that hasn't made a difference.

Has anyone got any suggestions?

EDIT: From playing about, I've nailed the issue (I think) to the product image. I went in to the view file and started to tear out a lot of the code. When I removed this line of code, the products displayed:

<img id="product-collection-image-<?php echo $_product->getId(); ?>"
src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($_imgSize); ?>"
alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

With further hacking away at the code, it's this line that seems to be causing all my problems:

src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($_imgSize); ?>"

Once I remove that, the products display but without the image displayed, just the contents of the alt field.

EDIT 2: This is the output of the error.log on the server:

[Tue Aug 15 07:31:06 2017] [error] [client 194.74.148.204] PHP Notice:  Use of undefined constant \xe2\x80\x99display_errors\xe2\x80\x99 - assumed '\xe2\x80\x99display_errors\xe2\x80\x99' in /var/www/website.com/public_html/index.php on line 44
[Tue Aug 15 07:31:16 2017] [error] [client 207.244.86.238] PHP Notice:  Use of undefined constant \xe2\x80\x99display_errors\xe2\x80\x99 - assumed '\xe2\x80\x99display_errors\xe2\x80\x99' in /var/www/website.com/public_html/index.php on line 44, referer: http://www.website.com
[Tue Aug 15 07:31:20 2017] [error] [client 207.244.86.238] PHP Notice:  Use of undefined constant \xe2\x80\x99display_errors\xe2\x80\x99 - assumed '\xe2\x80\x99display_errors\xe2\x80\x99' in /var/www/website.com/public_html/index.php on line 44, referer: http://www.website.com
[Tue Aug 15 07:31:48 2017] [error] [client 207.244.86.238] PHP Notice:  Use of undefined constant \xe2\x80\x99display_errors\xe2\x80\x99 - assumed '\xe2\x80\x99display_errors\xe2\x80\x99' in /var/www/website.com/public_html/index.php on line 44, referer: http://www.website.com
[Tue Aug 15 07:32:03 2017] [error] [client 207.244.86.238] PHP Notice:  Use of undefined constant \xe2\x80\x99display_errors\xe2\x80\x99 - assumed '\xe2\x80\x99display_errors\xe2\x80\x99' in /var/www/website.com/public_html/index.php on line 44, referer: http://www.website.com
  • Why you does not contact the MageWorx support team? – Siarhey Uchukhlebau Aug 15 '17 at 11:19
  • I have, and they haven't answered. – mickburkejnr Aug 15 '17 at 11:27
  • Please, open the error.log (usually it is located at /var/apache2/log/error.log) of your server and update your question: add the latest magento-related errors. – Siarhey Uchukhlebau Aug 15 '17 at 11:28
  • Could you post your ticket-number (ID) in the MageWorx system? I'll try to hurry up them. – Siarhey Uchukhlebau Aug 15 '17 at 11:36
  • I've edited the question with the output of the error.log – mickburkejnr Aug 15 '17 at 11:37
1

I finally cracked the issue.

After exhausting so many avenues with this issue, it turned out the server didn't have the PHP GD library installed. I'm not really sure why this would be a problem in a multi-store set up and not a problem on the whole, but since installing it the site is behaving like it should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.