
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:
link2.jpg
and this with the mouse pointer on the button:
link1.jpg
Bookmarks