Forums / Addon Admin Tools / Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Views: 35,770

Results 81 to 100 of 147
28 Apr 2015, 4:50 PM
#81
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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..

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???

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

2 May 2015, 3:35 PM
#82
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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...

2 May 2015, 3:41 PM
#83
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

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

3 May 2015, 5:15 AM
#84
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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.

3 May 2015, 5:16 AM
#85
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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.

3 May 2015, 6:15 PM
#86
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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:

// 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:

$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

4 May 2015, 3:43 AM
#87
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

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.

4 May 2015, 2:18 PM
#88
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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:

// 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:

5 May 2015, 5:17 PM
#89
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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

5 May 2015, 5:27 PM
#90
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

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

10 May 2015, 10:16 AM
#91
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Hi there,

Just a quick one. I am still getting a rogue '); } appearing on product info pages. I checked the file a few pages back, and can see the new version which I am on has been updated to reflect this. I am wondering if any files have been made redundant which may need deleting to address this? Thanks for your help in advance

10 May 2015, 3:56 PM
#92
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

In the includes/your_template/templates/tpl_modules_back_in_stock_fancybox.php there was an issue with the ending of the file, not being in the php. Try looking there. I think this is fixed in later versions. But I'll verify tomorrow, when I'm back in the office.

26 May 2015, 3:50 PM
#93
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

HeathenMagic:

Hi there,

Just a quick one. I am still getting a rogue '); } appearing on product info pages. I checked the file a few pages back, and can see the new version which I am on has been updated to reflect this. I am wondering if any files have been made redundant which may need deleting to address this? Thanks for your help in advance

I was wrong, this was actually in the javascript, this is fixed in 4.5.0 (submitted for moderation this morning).

26 May 2015, 3:51 PM
#94
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

bislewl:

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

UPDATE
This is fixed in 4.5.0 (submitted for moderation this morning).

26 May 2015, 3:52 PM
#95
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

bislewl:

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

DivaVocals-

This is fixed in 4.5.0 (submitted for moderation this morning), however it only sorts in ASC order, as of now

27 May 2015, 2:34 AM
#96
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

bislewl:

DivaVocals-

This is fixed in 4.5.0 (submitted for moderation this morning), however it only sorts in ASC order, as of nowand when will it be updated to sort both ways??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

24 Jun 2015, 11:58 AM
#97
yiorgos avatar

yiorgos

New Zenner

Join Date:
Dec 2010
Location:
Dublin, Ireland
Posts:
6
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Hi,

I wonder if you can help me.

I have installed the latest version of the module on 1.5.1 as per instructions. When I click on the link it redirects me to my homepage, to url
(mystore)/#back-in-stock-popup-wrapper and no fancybox appears. Any ideas what may be causing this?

Thanks in advance.

24 Jun 2015, 9:13 PM
#98
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

yiorgos:

Hi,

I wonder if you can help me.

I have installed the latest version of the module on 1.5.1 as per instructions. When I click on the link it redirects me to my homepage, to url
(mystore)/#back-in-stock-popup-wrapper and no fancybox appears. Any ideas what may be causing this?

Thanks in advance.

Either

The fancy box isn't in the foooter
Or
There is a js issue like it isn't loading or breaks before it

25 Jun 2015, 10:56 AM
#99
yiorgos avatar

yiorgos

New Zenner

Join Date:
Dec 2010
Location:
Dublin, Ireland
Posts:
6
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

bislewl:

Either

The fancy box isn't in the foooter
Or
There is a js issue like it isn't loading or breaks before it

Thank you for your reply.
I've copied all the code in the footer, there must be something wrong with js.
I am getting this error

TypeError: $(...).ready is not a function
#2 (path)/jscript/jquery/jquery_back_in_stock.js:1:13
#1 (path)/jscript/jquery/jquery_back_in_stock.js:1:13

25 Jun 2015, 7:36 PM
#100
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

yiorgos:

Thank you for your reply.
I've copied all the code in the footer, there must be something wrong with js.
I am getting this error

I'm thinking either you jQuery isn't loading or isn't loading a new enough version. You should be loading at least 1.10.x. Preferred version is the most recent for PCI compliance and that is 1.11.3 as of now.

What version of jQuery are you loading?