Re: Back In Stock Notifications
Hi Laurie,
Your template/CSS is messing this up slightly, but it's easily fixed...
If you add
Code:
<br class="clearBoth">
before the opening <form> tag for the back in stock notification form, things should look better!
Hope that helps!
All the best..
Conor
Re: Back In Stock Notifications
Thanks conor.
So which php block do I have to add that code to.
Thanks
Laurie
Re: Back In Stock Notifications
Hi Laurie,
Quote:
Originally Posted by
chalfontgifts
So which php block do I have to add that code to.
In tpl_product_info_display.php
Put it before the form on that page.
All the best...
Conor
Re: Back In Stock Notifications
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.
Any help you could provide would be VERY appreciated!
I'm assuming it's tied to the product type after I tried the following:
Checked against 2 items: A with product-type = 1, and B with product-type = 7
Copied tpl_product_info_display.php from download as tpl_product_info_display.php and tpl_product_book_info_display.php (so the files were identical)
Checked both items - same display template, just a different value in the product-type field
A (with product-type 1) shows option correctly, B does not show option at all
Both are using the EXACT same product_info_display template. I didn't modify any of the other files at all.
http://rav4.websitewelcome.com/~cdiw...sbackorder.gif
Re: Back In Stock Notifications
Hi Helen,
Quote:
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
Re: Back In Stock Notifications
Thank you Conor, that worked beautifully! :)
I had one more question.
I noticed the link to the notification form uses the full URL. Since I'm using only one product type, it was pretty easy to change the filename FILENAME_PRODUCT_INFO so it matched my product type, but it might get more cumbersome for those with more than one product type.
Is it possible just to build a link with the bookmark (ie. a href=#back_in_stock_notification_form instead of a href="http://www.domain.com/index.php.....#back_in_stock)?
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
helen610
Thank you Conor, that worked beautifully! :)
No problem. :)
Quote:
Originally Posted by
helen610
I noticed the link to the notification form uses the full URL.
Is it possible just to build a link with the bookmark (ie. a href=#back_in_stock_notification_form instead of a href="http://www.domain.com/index.php.....#back_in_stock)?
Oh, yes, I had forgotten that the link for the current page would also need to be changed.
Thanks for your suggestion, but to be honest I'm not going to change the way the module works because using a simple anchor over a fully-qualified anchor breaks the link with certain SEO modules. I realise this means that people with custom product type pages will have more work to do, but the work for them is minimal and there are far more people who use SEO modules than custom product types.
Thanks for your interest in making things easier for others though!
Glad you like the module.
All the best...
Conor
Ceon
Re: Back In Stock Notifications
Hi Conor
the module works ok, except the enail addresses are not being stored, if i login as a user, it tells me i have no subscriptions, if i login via admin, catalog, notify, it tells me 3 products have subsciptions, but if i run the test email, it says none to send, any ideas what ive missed?
thanks
Andy
Re: Back In Stock Notifications
Hi Andy,
Quote:
Originally Posted by
andy
any ideas what ive missed?
I'm afraid not but you've definitely not installed things properly then!
Please get in contact privately with some admin details for your site and FTP and PHPMyAdmin login details. You can delete any temporary accounts later.
http://dev.ceon.net/contact_us
All the best..
Conor
Ceon
Re: Back In Stock Notifications
Hi Conor
thanks for all the support, module is excellent
Andy