Snowman Posted October 28, 2003 Share Posted October 28, 2003 This module give you the ability to assign various estimated despatch dates and product availability messages to your customers (ala amazon.com) eg: This product ships in 24 hours or This product ships in 2 to 3 Days etc etc You can assing various messages to each product and these are then displayed immediately under the products price on the product_info.php page DOWNLOAD HERE enjoy :) Quote Link to comment Share on other sites More sharing options...
RobAnderson Posted October 29, 2003 Share Posted October 29, 2003 (edited) Hi Steve, I've installed your mod and it is working for the most part (Milestone 2.2), although seemed to be missing an entry in product_availability.sql script to add products_availability_id to the Products Table ;-) (unless I missed something in your instructions). I added it manually and it now works. Also, phpmyAdmin which I used to add the SQL script, doesn't seem to like varchar(256) so I changed to varchar(255). One final thing you might be able to help me on. In the Products Availibility admin page whenever I Insert another entry, it only accepts the second character of whatever I type when I Save. When I go back and edit the entry, it accepts whatever I type and saves succesfully that time. It still works OK once I've gone back and edited it, just weird. Not sure if this is related to the mod or my customised OSC site. Any ideas? Cheers, Rob P.S. Thanks for your work on this, a very useful contribution. P.P.S. Small suggestion for others, I added some code to product_info.php to hide the additional products availability row if there is no entry against the product (saves on space). See below: <?php ? ?if (tep_not_null($products_availability_info['products_availability_name'])) { ?> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main" align="right" valign="top"></td> ? ? ? ? ? ?<td class="main" align="right" valign="top"><?php echo TEXT_AVAILABILITY; ?>: <?php echo $products_availability_name; ?></td> ? ? ? ? ?</tr> <?php ? ?} ?> Edited October 29, 2003 by RobAnderson Quote Link to comment Share on other sites More sharing options...
Snowman Posted October 29, 2003 Author Share Posted October 29, 2003 Thanks for pointing out the bugs... ive found a few mistakes i made when stripping the mod out of my own store. I'll fix the bugs and add your code and re-contribute it shortly. As for the issue on Products Avability when entering an option....i cant seem to recreate that bug. Quote Link to comment Share on other sites More sharing options...
Snowman Posted October 29, 2003 Author Share Posted October 29, 2003 Updated version now contributed :) Quote Link to comment Share on other sites More sharing options...
crash3903 Posted October 29, 2003 Share Posted October 29, 2003 Hi Snowman I have installed the contribution and all works well until i go to add a availability to product I get the following error 1146 - Table 'db86081255.TABLE_products_availability' doesn't exist select products_availability_id, products_availability_name from TABLE_products_availability order by products_availability_name [TEP STOP] The table does exist I can see it in phpmyadmin any ideas thanks mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
Guest Posted October 29, 2003 Share Posted October 29, 2003 You need a define('TABLE_PRODUCTS_AVAILABILITY', 'products_availability'); in includes/database_tables.php or includes/application_top.php, or the capitalization is wrong in the file (capitalization needs to match; all caps is the standard for defines). Hth, Matt Quote Link to comment Share on other sites More sharing options...
crash3903 Posted October 29, 2003 Share Posted October 29, 2003 thanks Matt I have changed the capitilization b4 i sawy our post and that resolved it - sorry to bother you but i now don't see the drop down in the edit/add product sections?? any ideas Thanks Mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
Snowman Posted October 29, 2003 Author Share Posted October 29, 2003 firstly make sure you have v1.02 then make sure you apply all the edits, load the files and upload the sql file to your database. Quote Link to comment Share on other sites More sharing options...
crash3903 Posted October 29, 2003 Share Posted October 29, 2003 thanks Matt I have verion 1.1a which is what is in the contributions and I can't find any other one?? Mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
Snowman Posted October 29, 2003 Author Share Posted October 29, 2003 ah yes my mistake i named it incorrectly. Just go back thru and double check each step Quote Link to comment Share on other sites More sharing options...
crash3903 Posted October 29, 2003 Share Posted October 29, 2003 thanks steve double checked and still no show?? mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
crash3903 Posted October 29, 2003 Share Posted October 29, 2003 Things seem to be showing all ok except for the drop down when i want to edit the product?? Any ideas I have checked and double checked everything and still not able to get it to show would it help if i posted the code for you to have a look at? If so what page? Thanks Mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
cgchris99 Posted October 29, 2003 Share Posted October 29, 2003 Anyone have a shop showing this contribution in action? Quote Link to comment Share on other sites More sharing options...
Snowman Posted October 30, 2003 Author Share Posted October 30, 2003 Anyone have a shop showing this contribution in action? I am running it on my own store and its working fine, but im still building my new site ans so i havent taken it live yet. Quote Link to comment Share on other sites More sharing options...
jadjei Posted October 30, 2003 Share Posted October 30, 2003 (edited) Hi, I've got as far as Mark as well. All seems OK apart from no dropdown on the add/edit product page. jon Edited October 30, 2003 by jadjei Quote :: Web Jetty :: ...bringing art to the digital world :: http://webjetty.co.uk/ Link to comment Share on other sites More sharing options...
crash3903 Posted October 30, 2003 Share Posted October 30, 2003 glad i am not the only one :rolleyes: Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
Snowman Posted October 30, 2003 Author Share Posted October 30, 2003 no drop down list or nothing in the drop down list??? Quote Link to comment Share on other sites More sharing options...
crash3903 Posted October 30, 2003 Share Posted October 30, 2003 no drop down list showing Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
Snowman Posted October 30, 2003 Author Share Posted October 30, 2003 If there is no drop down then youve missed a part of the code in categories.php in your admin. find the lines: <tr> <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> and add the following immediately afterwards: <?php if (tep_not_null($products_availability_info['products_availability_name'])) { ?> <tr> <td class="main" align="right" valign="top"></td> <td class="main" align="right" valign="top"><?php echo TEXT_AVAILABILITY; ?>: <?php echo $products_availability_name; ?></td> </tr> <?php } ?> also check the file to make sure that the refernce to TABLE_PRODUCTS_AVAILABILITY says that and not TABLE_products_availability in the section you should have added immediately after $pInfo->objectInfo($product); } elseif (tep_not_null($HTTP_POST_VARS)) { $pInfo->objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } Quote Link to comment Share on other sites More sharing options...
jadjei Posted October 30, 2003 Share Posted October 30, 2003 I've got that code in place, and had sussed out the capitalization problem, but still no show. Is this really all the code needed to display the dropdown? <?php echo TEXT_AVAILABILITY; ?>: <?php echo $products_availability_name; I don't know my way around osCommerce very well still, but should it have a 'tep_draw_pull_down_menu' somewhere? jon Quote :: Web Jetty :: ...bringing art to the digital world :: http://webjetty.co.uk/ Link to comment Share on other sites More sharing options...
Snowman Posted October 30, 2003 Author Share Posted October 30, 2003 (edited) bingo...staring me rihg tin the face... i forgot to transfer the line across to the readme. change that section to: <tr> <td class="main"><?php echo TEXT_PRODUCTS_SHIPPINGETA; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('shippingeta_id', $shippingeta_array, $pInfo->shippingeta_id); ?></td> </tr> Edited October 30, 2003 by Snowman Quote Link to comment Share on other sites More sharing options...
Snowman Posted October 30, 2003 Author Share Posted October 30, 2003 also remove the <?php if (tep_not_null($products_availability_info['products_availability_name'])) { ?> section before it and the <?php } ?> section that i said to add immediately after it. that should do it... I built this mod up in a highly modded site and when i stripped it back out i thinkid only had 8 cups of coffee for the day. I will repost the contribution shortly for those who want to start from scratch Quote Link to comment Share on other sites More sharing options...
jadjei Posted October 30, 2003 Share Posted October 30, 2003 Great.. I'm still not getting the dropdown showing up tho. I guess the test whether to show it or not is saying not to. <?php if (tep_not_null($products_availability_info['products_availability_name'])) { ?> Any idea why? jon Quote :: Web Jetty :: ...bringing art to the digital world :: http://webjetty.co.uk/ Link to comment Share on other sites More sharing options...
jadjei Posted October 30, 2003 Share Posted October 30, 2003 OK, ignore that :) I'm now getting an empty dropdown tho. jon Quote :: Web Jetty :: ...bringing art to the digital world :: http://webjetty.co.uk/ Link to comment Share on other sites More sharing options...
Snowman Posted October 30, 2003 Author Share Posted October 30, 2003 Ok bugfixed version now contributed :) http://www.oscommerce.com/community/contributions,1621 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.