Hi Helen,

Originally Posted by
helen610
I can't get this to work with the Book Type add-on. The back-in-stock notification option does not show on the product page if the product type does not equal 1.
You're not quite right.
The Back In Stock Notification module works on the basis of the value of the $products_quantity variable as generated by the file:
includes/modules/pages/product_info/main_template_vars.php
This value is read in the observer class for the module, which attaches itself to the event:
NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_PRODUCT_INFO
It then sets up variables to be used by the template file to display the link and form.
Obviously the product_book_info page type you have defined is a custom page?
If you have created it by copying the product_info page scripts (header.php, main_template_vars.php) then you can easily integrate the Back In Stock Notifications module by modifying the following file..
includes/classes/observers/class.back_in_stock_notificationsProductInfo.php
Change:
PHP Code:
$zco_notifier->attach($this,
array(
'NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_PRODUCT_INFO'
)
);
to:
PHP Code:
$zco_notifier->attach($this,
array(
'NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_PRODUCT_INFO',
'NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_PRODUCT_BOOK_INFO'
)
);
That should be all you need to get this working with your custom product type. No reference to the product_type is made, all that has to be done is for this observer to run and to have a $products_quantity variable to check!
(Of course the above assumes that you have a NOTIFY_MAIN_TEMPLATE_VARS_EXTRA_PRODUCT_BOOK_INFO event within your main_template_vars.php for the product_book_info page).
Easy! :)
All the best...
Conor
Ceon
Bookmarks