As you know I got the details.tpl.php to print out the autopopulate link however ideally I would like it to appear in it's own panel. Since I am not really sure how to do that yet I thought I would try using display:none to wipe out the details. However once I added another details panel everything broke.

Fatal error: Cannot redeclare amazon_store_manufacturer_format() (previously declared in xample.com/sites/all/modules/amazon_store/amazon_store_details_panel.tpl.php on line 39

CommentFileSizeAuthor
#2 amazon_store.details_panel.patch6.55 KBFrando

Comments

rfay’s picture

This is not support that would normally be done here, but I will try to take a look at it next time I work on the module.

In the meantime, why don't you try to solve it? If you look at the tpl.php, maybe you can figure out a workaround that allows it to be used twice. Then post a patch here.

Frando’s picture

Title: Adding more than one details panel breaks store in panels. » Printing multiple product description in one page load results in fatal error
Version: 6.x-2.0-alpha1 » 6.x-2.1-rc2
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new6.55 KB

Yup, this makes it impossible to display more than one description in a single page load.

The attached patch fixes the problem.

In general, you should not declare function in template files, ever. Template files are supposed to be easily overrideable by themers, and contain as little PHP code as possible. Helper functions belong in the .module file or include files, but not template files. Declaring a function in a template file makes it impossible to use the template twice in a single page load.

rfay’s picture

Excellent! Thanks, @frando.

@stieglitz, please test and RTBC if it is. Or I'll get to this the next time I work on the module.

rfay’s picture

Status: Needs review » Fixed

Committed to DRUPAL-6--2.

Thanks so much for the help and the gentle correction, @frando. I have much to learn. Sorry this took me so long to get to.

rfay’s picture

Status: Fixed » Closed (fixed)

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