Zen Cart Logo
Forums / General Questions / Tell-a-Friend Not Showing Value in new Product Type

Tell-a-Friend Not Showing Value in new Product Type

Views: 732

Results 1 to 2 of 2
12 May 2011, 11:07 AM
#1
ricm avatar

ricm

New Zenner

Join Date:
Mar 2011
Posts:
51
Plugin Contributions:
0

Tell-a-Friend Not Showing Value in new Product Type

using v1.3.9h...

I have created a new product type based on product_music largely by cloning the product_music database tables and associated files.

The new type product_photo appears mostly to be working (at least as far as the admin side is concerned), The new type is for providing additional fields related to the sale of stock photos.

The three entities replacing record_artist, record_company and music_genre are:

photographers
model_release
property_release

a 4th entity, a text field called image_sizes, is to be implemented when the other three are working perfectly.

I can set/edit/delete values for photographers/model_release/property_release in menu option "Extras" so those appear to be OK.

The problem is in Product Type Layout for the new product type. One value, "Show Product Tell a Friend Button" does not display 0 or 1; it is blank. However, the corresponding row in table zen_product_type_layout IS being written to when the "Tell a Friend" value is edited (True/False) via the dropdown.

I can see nothing wrong with the values against the new configuration key "SHOW_PRODUCT_PHOTO_INFO_TELL_A_FRIEND", the product_type_id is correct and the set_function value is obviously correct for the True/False dropdown to work.

I can't see any reason why this one option fails to display.

There is one error in the debug output produced when the layout page for the new type is accessed but I think that error is to do with something else (- to do with tax). I intend to post a separate question about that but just in case it IS related here is that output:

"[12-May-2011 11:30:01] PHP Warning:  call_user_func(NULL
) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback in /home/[path-to-admin-hidden]/includes/functions/general.php on line 1701
"

Any suggestions?

Thanks,
Ric

13 May 2011, 12:35 PM
#2
ricm avatar

ricm

New Zenner

Join Date:
Mar 2011
Posts:
51
Plugin Contributions:
0

Re: Tell-a-Friend Not Showing Value in new Product Type

I still haven't solved these problems but I am a little closer to understanding what's going on.

I am still getting the error:

[13-May-2011 13:18:10] PHP Warning: call_user_func(NULL
) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback in /home/[admin-path-hidden]/includes/functions/general.php on line 1701

It happens only in the new product type product_photo. I have now completed all the front-end (catalog) changes and, as far as I can tell everything is working correctly. All values appear to be updated; values in the databse appear correct.

Inspecting parameters around line 1701...

If I select product type product_music and inspect the values of $function, $parameter, $object, none of them appear to be initialised (or are empty).

If I switch to product_photo the parameters appear to be: - $function: NULL,

  • $parameter: 0,
  • $object 2: '' (uninitialised or empty)

It's the NULL value causing the error in the call
call_user_func(NULL)

The block of code around 1701 in general.php is to do with tax rates. Checking the values for "DEFAULT_PRODUCT_PHOTO_TAX_CLASS_ID" in table product_type_layout, I have:

Product Price Tax Class Default - When adding new ...
DEFAULT_PRODUCT_PHOTO_TAX_CLASS_ID
0
What should the Product Price Tax Class Default ID...
8
100
NULL
2011-05-07 22:00:00
'' (empty)
'' (empty)

Comparing this to DEFAULT_PRODUCT_MUSIC_TAX_CLASS_ID I have identical values apart from product_type_id (which would be correct). So the error does not appear to be in the creation of the additional row for the new product type.

I'm really struggling here and any help will be much appreciated.

Thanks,
Ric