If a user unchecks the box on a product page to unsubscribe from back-in-stock notifications, the AJAX request returns a 404. Does anyone else experience this behavior?
Report to the bugtracker
[quote name='tbirnseth' timestamp='1409031739' post='190636']
Report to the bugtracker
[/quote]
I wanted to ensure I didn't break it myself by customizations I had made, so that's why I was asking if anyone could reproduce it.
Hello,
I have just tested it and could not reproduce this issue.
[quote name='simtechdev' timestamp='1409032093' post='190638']
Hello,
I have just tested it and could not reproduce this issue.
[/quote]
Thanks for trying it out. I realized I could've tested it on the demo (whoops), and I did and was able to reproduce it.
#1 Visit Instant Demo - CS-Cart Multi-Vendor Demo Try Free for 15 days
#2 Click the checkbox to be nofified
#3 Unselect the checkbox.
You will see the error (which is from the AJAX call hitting a 404)
I've added it to the bugtracker.
We also reproduced it on our local installation. If you need a quick fix, open the design/themes/THEME/templates/common/product_data.tpl file and replace:
{if !$auth.user_id}
if (!this.checked) {
Tygh.$.ceAjax('request', '{"products.product_notifications?enable="|fn_url nofilter}' + 'N&product_id={$product.product_id}&email=' + $('#product_notify_email_{$obj_prefix}{$obj_id}').get(0).value, {$ldelim}cache: false{$rdelim});
}
{else}
Tygh.$.ceAjax('request', '{"products.product_notifications?enable="|fn_url nofilter}' + (this.checked ? 'Y' : 'N') + '&product_id=' + '{$product.product_id}', {$ldelim}cache: false{$rdelim});
{/if}
with
{if !$auth.user_id}
if (!this.checked) {
Tygh.$.ceAjax('request', '{"products.product_subscriptions?enable="|fn_url nofilter}' + 'N&product_id={$product.product_id}&email=' + $('#product_notify_email_{$obj_prefix}{$obj_id}').get(0).value, {$ldelim}cache: false{$rdelim});
}
{else}
Tygh.$.ceAjax('request', '{"products.product_subscriptions?enable="|fn_url nofilter}' + (this.checked ? 'Y' : 'N') + '&product_id=' + '{$product.product_id}', {$ldelim}cache: false{$rdelim});
{/if}
Thanks
[quote name='eComLabs' timestamp='1409050738' post='190660']
We also reproduced it on our local installation. If you need a quick fix
[/quote]
Thanks for the fix. CS-Cart has fixed this for a future version and their fix is here: http://forum.cs-cart.com/tracker/issue-5203-unsubscribing-from-out-of-stock-product-notifications-is-broken/
[quote name='srichter' timestamp='1409117825' post='190768']
Thanks for the fix. CS-Cart has fixed this for a future version and their fix is here: http://forum.cs-cart…ions-is-broken/
[/quote]
You are welcome. I am glad to hear that the issue was fixed by CS-Cart team so fast