Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
So now that my client has had a week with this she is having issues..
Quote:
On the old Ceon one, you could sort by product, so when I was placing an order with a company I would just go into there and make sure I ordered what people were waiting on notifications for. This one doesn’t sort at all (even though there is a link on the Products column). It also doesn’t have the model number on there, so I have to keep going back to the product on the catalog page and looking up the model number. It also doesn’t tell me if it is in stock. With the old one, I could go in there and it would say how many were in stock. Then I could send notifications.
Is anyone else having similar issues???
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
DivaVocals
So now that my client has had a week with this she is having issues..
Is anyone else having similar issues???
Nope never had that problem till now...
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
I'm trying to make a modification so that the POPUP will only work in the product page and not in the various product listing (also becouse the add-on only work in the product page) but till now i've no luck... any help would be appreciated :P
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
izar74
I'm trying to make a modification so that the POPUP will only work in the product page and not in the various product listing (also becouse the add-on only work in the product page) but till now i've no luck... any help would be appreciated :P
Remove the code that adds the fancy box in the TPL_footer or whoever you put it and add it to the TPL_product_info_default.
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
DivaVocals
So now that my client has had a week with this she is having issues..
Is anyone else having similar issues???
That is to be done/fixed along with the ability to delete and pagination in a future version.
2 Attachment(s)
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
bislewl
Remove the code that adds the fancy box in the TPL_footer or whoever you put it and add it to the TPL_product_info_default.
Thanks bislew, it was quite simple... (the file should be tpl_product_info_display.php, right?).
Maybe this is not related to the Back in stock add on so if i'm out of the box please tell me... I've modified the function_general.php so that it show a button instead of the simple text, and i was trying to modify the "out of stock" button to be able to be pressed and work exactly like the "Details" button opening the product info page from where you can click on the "out of Stock" button and it will correctly open the Fancybox. I know that clicking on the image just do the same, but having a button is simplier for customer.
Here the function_general.php modification i've made:
PHP Code:
// cannot be added to the cart
case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
return $additional_link;
break;
case ($button_check->fields['product_is_call'] == '1'):
$return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . TEXT_CALL_FOR_PRICE . '</a>';
break;
case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
if ($_GET['main_page'] == zen_get_info_page($product_id)) {
if(BACK_IN_STOCK_ENABLE == "true"){
$return_button = '<div class="product_detail"><a class="back-in-stock-listing-popup-link" href="#back-in-stock-popup-wrapper">' . zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BACK_IN_STOCK_LINK) . '</a></div>';
$return_button .= zen_draw_hidden_field('bis-product-id', (int) $product_id, 'class="bis-product-id"');
}
else{
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
}
} else {
$return_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_SOLD_OUT_ALT, BUTTON_SOLD_OUT_SMALL_ALT) . '</a>';
}
break;
default:
$return_button = $link;
break;
}
if ($return_button != $link and $additional_link != false) {
return $additional_link . '<br />' . $return_button;
} else {
return $return_button;
}
}
The part responsible for the link should be:
PHP Code:
$return_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_SOLD_OUT_ALT, BUTTON_SOLD_OUT_SMALL_ALT) . '</a>';
but the link doesn't work, it miss the pruduct_id.
in this image You can see the link (lower left corner) with the mouse pointer on the image:
Attachment 15253
and this with the mouse pointer on the button:
Attachment 15254
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
The product listing box is slightly different as the fancy box is populated by jquery. Otherwise there would need to be a fancy box for each product.
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
bislewl
The product listing box is slightly different as the fancy box is populated by jquery. Otherwise there would need to be a fancy box for each product.
Thanks for the info. I corrected the function so that now it work :smile:
Here the PHP code of function_general.php, this way whae a product is out of stock it will show a CSS button that link to the product page.
Finde the first line and replace with this code:
PHP Code:
// cannot be added to the cart
case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
return $additional_link;
break;
case ($button_check->fields['product_is_call'] == '1'):
$return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . TEXT_CALL_FOR_PRICE . '</a>';
break;
case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
if ($_GET['main_page'] == zen_get_info_page($product_id)) {
if(BACK_IN_STOCK_ENABLE == "true"){
$return_button = '<div class="product_detail"><a class="back-in-stock-listing-popup-link" href="#back-in-stock-popup-wrapper">' . zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BACK_IN_STOCK_LINK) . '</a></div>';
$return_button .= zen_draw_hidden_field('bis-product-id', (int) $product_id, 'class="bis-product-id"');
}
else{
$return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
}
} else {
$return_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . (int) $product_id) . '">' . zen_image_button(BUTTON_SOLD_OUT_ALT, BUTTON_SOLD_OUT_SMALL_ALT) . '</a>';
}
break;
default:
$return_button = $link;
break;
}
if ($return_button != $link and $additional_link != false) {
return $additional_link . '<br />' . $return_button;
} else {
return $return_button;
}
}
Hope it will help :blush:
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
abcisme
Having difficulties getting this plugin to work properly. It subscribes fine and sends out a confirmation email. When I run the cron file, it says it is sending out notifications, but it doesn't send them. It marks the date in the database as 1899-11-30 00:00:00 for some, but others it leaves null. I'm not sure what the heck is going on. I need it to send out a notification when a product is changed from <=0 quantity to >1 quantity.
I found the issue!
When Maximum Emails per Batch = 0 Nothing goes out, change that value to what it should be or something incredibly impossible like 9999999
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
DivaVocals
So now that my client has had a week with this she is having issues..
Is anyone else having similar issues???
I discovered the issue is that it sorts by product_id (which is of little use) and so I will need to add a join statement with the product tables