Zen Cart Logo
Forums / All Other Contributions/Addons / Request Restock Mod Thread

Request Restock Mod Thread

Locked

Views: 23,630

Results 1 to 20 of 138
This thread is locked. New replies are disabled.
1 Jul 2007, 4:54 PM
#1
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Request Restock Mod Thread

I'm modifying the "Ask a question" Mod to let the customer request a sold out product to be restocked, check the example here:
http://www.konkito.com/index.php?main_page=product_info&products_id=342

For now it only sends an email notifying the store owner, but I'm working on it to have it recored in the database and automatically notifies the customers when the products they want get restocked.

Tell me if you are interested in this Mod and I'll post it after finishing. Any suggestion is welcomed.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

8 Jul 2007, 8:12 AM
#3
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

After the much hassle in getting to know ZenCart, I finishes the first stage:

  1. Request is added into database
  2. A notification is also sent to the store admin by emailSecond stage will be the admin's side:
  3. List requests by user
  4. List requests by product
  5. Admin Edit/Delete a request
  6. Cleap up requests (delete requests for deleted product, also send out notification to customers if you want)
  7. Send out notification to customers
  8. Also let the customer view/edit/delete requests they made.
    I hope I can finish stage 2 within 4 days.
    If you have any features you want in mind please let me know.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

22 Jul 2007, 10:30 AM
#4
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

Check the attached file for alpha 1 version. If you can please help me to check it out and give me feedbacks so I can improve it.

Attachment replaced by link:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=660

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

22 Jul 2007, 10:44 AM
#5
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

__________

I messed up the sql file with part of the CrossSell sql file, so please ignore the attached file from the post above.

Attachment replaced by link:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=660

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

23 Jul 2007, 1:33 AM
#6
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

Changes from Alpha 1:

  1. Fix bugs + Clean code
  2. Let you limit the number of email sent out per hour/day (this is useful if your host puts a limit on this)

Current features:

  1. Allows customer to request a product to be restocked.
    The request will be added to database and emailed to Amin as the same time.
  2. Admin can view requests and update/send notifications once the products are restocked.

Future plan:

  1. Clean up the code.
  2. Add search
  3. Move some predefined variables into database so admin can change them from control-panel
  4. Let the customer request a product that we do not have yet.

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=660

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

23 Jul 2007, 10:58 AM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

I added Alpha 3 version to the download zone just now, so it'll be available within hours or days

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=660

Alpha 3 Changes:

  1. Allow admin to turn admin notification on/off.
  2. Added the missing css file, fixed display error in IE.
  3. Fixed the way how new message is appended.
  4. Some minor bug fixes.

This update completes the Alpha stage of this mod. It should be safe to use on your live site now. More updates may not come in a very near future tho since I'll start working on a different mod now.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

29 Jul 2007, 7:54 AM
#8
hennie avatar

hennie

New Zenner

Join Date:
Jan 2005
Posts:
18
Plugin Contributions:
0

Re: Request Restock Mod Thread

I cannot get the image displayed on the product info page. Something not referencing in the

<!--bof Restock button--> <?php if ($products_quantity <= 0) { ?>
<?php echo '<a href="' . zen_href_link(FILENAME_REQUEST_RESTOCK, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_REQUEST_RESTOCK, BUTTON_REQUEST_RESTOCK_ALT) . BUTTON_REQUEST_RESTOCK_ALT . '</a>'; ?></div>
<?php } ?> <!--eof Restock button -->

Please check http://www.onlinewarehouse.co.za

29 Jul 2007, 8:18 AM
#9
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

Fixed that bug + some minor code changes

Check attachment

Let me know if it works fine now.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

29 Jul 2007, 9:11 AM
#10
hennie avatar

hennie

New Zenner

Join Date:
Jan 2005
Posts:
18
Plugin Contributions:
0

Re: Request Restock Mod Thread

Thank you for the reply. The fix is still not working.

yellow1912:

Fixed that bug + some minor code changes

Check attachment

Let me know if it works fine now.

29 Jul 2007, 10:04 AM
#11
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

Can you please give me the exact link to an out-of-stock item on your site?

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

6 Aug 2007, 4:28 PM
#12
landshark avatar

landshark

New Zenner

Join Date:
Mar 2006
Posts:
83
Plugin Contributions:
0

Re: Request Restock Mod Thread

Great Mod!

I had the same problems as the previous poster but made it work. I think I am having a problem reading the "define" if that makes sense. I don't know the proper terminology. Reason i say this is that the image is not loaded and the alt tex is not either.

Here is a link to one in my site http://www.diytacticalstore.com/catalog/index.php?main_page=product_info&products_id=196

I do have suggestions a suggestion is it possible to make the "Quantity" box a numeric only field?

A few people have already entered things such as "2-3" or "approximately 5" this prevents the request from being recorded in the back end.

Also if they leave it blank it does not list in the admin. Even thought there is a "*" labeled as a required field there is no error when someone leaves it blank.

Thank you for your work on this.

Using: Zencart 1.3.7 and lovin' every minute of it.

6 Aug 2007, 4:33 PM
#13
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

Tell me, so u got the newest file (see my previous post for the attachment) and it still does not work?

And I'll check why it doesnt check the number thing, huhm!

Will have an updated version within 2 days.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

6 Aug 2007, 5:05 PM
#14
landshark avatar

landshark

New Zenner

Join Date:
Mar 2006
Posts:
83
Plugin Contributions:
0

Re: Request Restock Mod Thread

Yes I downloaded the file attached to post #9 in this thread. I will double check however just to be sure.

Thank you for looking into the number value. I would say about 80% of our requests are coming in with more than just a single number.

Using: Zencart 1.3.7 and lovin' every minute of it.

6 Aug 2007, 6:01 PM
#15
landshark avatar

landshark

New Zenner

Join Date:
Mar 2006
Posts:
83
Plugin Contributions:
0

Re: Request Restock Mod Thread

yellow1912:

Tell me, so u got the newest file (see my previous post for the attachment) and it still does not work?

I've doubled checked and i did download the latest version.

Is it possible that it has something to do with my shopping cart not being installed in the Root directory? It is installed in /catalog

Using: Zencart 1.3.7 and lovin' every minute of it.

6 Aug 2007, 9:26 PM
#16
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

First error:
I made a mistake in the installation guide, there is no file with the name tpl_product_info_display.com, the file you should edit is tpl_product_info_display.php

Double check that file in your custom template folder:

includes/templates/your_current_template/templates/tpl_product_info_display.php

The text/image displayed in your product_info page is the result of this code:

<!--bof Restock button-->
<?php
  if ($products_quantity <= 0) { ?>
    <?php echo '<a href="' . zen_href_link(FILENAME_REQUEST_RESTOCK, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_REQUEST_RESTOCK, BUTTON_REQUEST_RESTOCK_ALT) . BUTTON_REQUEST_RESTOCK_ALT . '</a>'; ?></div>
    
<?php
}
?>
<!--eof Restock button -->

Double check it.

And all those image and text are defined in:

includes/languages/english/your_current_template/request_restock.php

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

6 Aug 2007, 9:35 PM
#17
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

I see that you are currently using "template_default"?
If so, have you changed all the folders named TEST in the package to template_default before uploading them to your server?

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

6 Aug 2007, 9:58 PM
#18
landshark avatar

landshark

New Zenner

Join Date:
Mar 2006
Posts:
83
Plugin Contributions:
0

Re: Request Restock Mod Thread

Actually to be honest I didn't even realize you had made a mistake in the installation guide. here is the code as I modified it to show what is currently showing in the link i posted:

<!--bof Restock button-->
<?php
  if ($products_quantity <= 0) { ?>
	<div><?php echo '<a href="' . zen_href_link(FILENAME_REQUEST_RESTOCK, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_REQUEST_RESTOCK, Request_Restock_Notice) . '</a>'; ?></div>
	
<?php
}
?>
<!--eof Restock button -->

Placing the code as you have listed the no image did not show and this BUTTON_REQUEST_RESTOCK_ALTBUTTON_REQUEST_RESTOCK_ALT or something similar shoed up as the link,

I had to edit BUTTON_REQUEST_RESTOCK_ALT to Request_Restock_Notice and remove the BUTTON_REQUEST_RESTOCK_ALT this is outside the (BUTTON_IMAGE_REQUEST_RESTOCK, BUTTON_REQUEST_RESTOCK_ALT)

It is my understanding if there was a problem with the image then the ALT text should have shown? But it appears for me it was pulling the text that did show from the code i entered into the tpl_product_info_display.php file

I have very limited knowledge of code i just figured this out after a few hours of tinkering.

These two lines:

define('BUTTON_IMAGE_REQUEST_RESTOCK','button_request_restock.gif');
define('BUTTON_REQUEST_RESTOCK_ALT', 'Request Restock');

are listed in request_restock.php

i hope this explains what is going on a little bit better. Wish i could be of more help

Using: Zencart 1.3.7 and lovin' every minute of it.

6 Aug 2007, 10:01 PM
#19
landshark avatar

landshark

New Zenner

Join Date:
Mar 2006
Posts:
83
Plugin Contributions:
0

Re: Request Restock Mod Thread

yellow1912:

I see that you are currently using "template_default"?
If so, have you changed all the folders named TEST in the package to template_default before uploading them to your server?

I shouldn't be i placed a copy of the tpl_product_info_display.php file into my custom template's "templates" folder and modified that.

Maybe there is something else that is conflicting.

Using: Zencart 1.3.7 and lovin' every minute of it.

6 Aug 2007, 10:06 PM
#20
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Request Restock Mod Thread

You see, when I go to your site and check your html code, here is what I found out:

includes/templates/template_default/buttons/english/BUTTON_IMAGE_REQUEST_RESTOCK

It's saying that, the current template you are using is "template_default"

The button image and alt text are not loaded because 1 reason: they are defined in request_restock.php, and that file should be in

 		 			 includes/languages/english/your_current_template/request_restock.php  

which, in your case here, would be:

 		 			 includes/languages/english/template_default/request_restock.php  

Make sure you have it in the right place. If it still does not work, I'm here to help!

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me