See www.pc-support.uk.com for relevant links.

Clicking on any Amazon shop page that I have on my site brings it up and works fine BUT clicking on my "Software Shop" page brings up the following errors:

Notice: Undefined variable: operatingsystem in include() (line 13 of /home/pcsuppor/public_html/sites/all/modules/amazon/amazon_media/amazon-item--software--details.tpl.php).
Notice: Undefined variable: operatingsystem in include() (line 13 of /home/pcsuppor/public_html/sites/all/modules/amazon/amazon_media/amazon-item--software--details.tpl.php).
Notice: Undefined variable: operatingsystem in include() (line 13 of /home/pcsuppor/public_html/sites/all/modules/amazon/amazon_media/amazon-item--software--details.tpl.php).
Notice: Undefined variable: operatingsystem in include() (line 13 of /home/pcsuppor/public_html/sites/all/modules/amazon/amazon_media/amazon-item--software--details.tpl.php).

Suggestions?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Title: Error message BUT ONLY from Amazon software sales » Undefined variable: operatingsystem in include() (line 13 of amazon_media/amazon-item--software--details.tpl.php)

Sounds like there's an error in amazon-item--software--details.tpl.php.

Could you please provide a sample ASIN that gives you this error?

pcsupport’s picture

Bringing up this page gives the error message: http://www.pc-support.uk.com/content/software-shop

This one works fine: http://www.pc-support.uk.com/content/laptop-shop

rfay’s picture

So it looks like http://www.pc-support.uk.com/amazon_store/item/B001AMHWP8 (ASIN B001AMHWP8) should cause this.

Just FYI: On a production site you can (and will probably want to) turn off error notifications at admin/config/development/logging

Patches are welcome to solve this.

pcsupport’s picture

Typical - the revenge of Steve jobs!

pcsupport’s picture

I removed that item and tried it but with no luck - same problem.

I'll turn off those notifications.

rfay’s picture

Status: Active » Needs review
FileSize
993 bytes

I think this will fix the problem. Some of the Microsoft products did not have the expected Operating System value.

rfay’s picture

Status: Needs review » Fixed

Committed to HEAD: https://drupal.org/cvs?commit=491414.

This will show up in the dev release within 12 hours, so please test.

@pcsupport, if you have copied the amazon-item--software--details.tpl.php file to your theme and altered it, you'll have to make these changes there as well, and then rebuild your theme registry.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.