gavatron1010 Posted October 17, 2014 Share Posted October 17, 2014 It seems that I've found a bug preventing the table rates from working properly. The table rate that was being applied to the product irrespective of quantity was the first rate entered into the table shipping_table_rates. The bug I discovered was in: /catalog/includes/modules/shipping/separate.php on line 125 // independent tbl query for products'/ category's[qty] $status_query2 This portion of code is missing parenthesis around the or conditions: where (p_stat = '1' or c_stat = '1') and cb.products_id = str.p_id or ptc.categories_id = str.c_id and It should read: where (p_stat = '1' or c_stat = '1') and (cb.products_id = str.p_id or ptc.categories_id = str.c_id) and I also had to remove this portion to make my table rates function properly: (p_stat = '1' or c_stat = '1') and This is version SSPP v1.852 OsCommerce 2.3.4 Quote Link to comment Share on other sites More sharing options...
Dirk Duckler Posted October 22, 2014 Share Posted October 22, 2014 I've installed Separate Shipping v1.85 on my OSCommerce 2.2, followed all instructions, and am receiving this error when clicking on "Shipping Rates" within the admin console: 1146 - Table 'houseofhid.TABLE_SHIPPING_MODE' doesn't exist select c_mode, c_sep from TABLE_SHIPPING_MODE where c_id =113[TEP STOP] I've attached screenshots of the modules menu showing it is installed, as well as the error received above. I did perform a database backup prior to installing. What needs to be corrected in my database? Here's a dump of the necessary tables: -- -- Database: `houseofhid` -- -- -------------------------------------------------------- -- -- Table structure for table `shipping_mode` -- CREATE TABLE IF NOT EXISTS `shipping_mode` ( `mode_id` int(255) NOT NULL auto_increment, `c_id` int(255) NOT NULL default '0', `p_id` int(255) NOT NULL default '0', `c_mode` int(2) NOT NULL default '0', `p_mode` int(2) NOT NULL default '0', `c_sep` int(2) NOT NULL default '0', `p_sep` int(2) NOT NULL default '0', PRIMARY KEY (`mode_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=11 ; -- -- Dumping data for table `shipping_mode` -- -- -------------------------------------------------------- -- -- Table structure for table `shipping_rates` -- CREATE TABLE IF NOT EXISTS `shipping_rates` ( `rate_id` int(11) NOT NULL auto_increment, `c_status` int(2) NOT NULL default '0', `p_status` int(2) NOT NULL default '0', `c_free` int(11) NOT NULL default '0', `p_free` int(11) NOT NULL default '0', `c_per` int(2) NOT NULL default '0', `p_per` int(2) NOT NULL default '0', `c_id` int(11) NOT NULL, `p_id` int(11) NOT NULL, `c_rate` decimal(20,2) NOT NULL default '0.00', `p_rate` decimal(20,2) NOT NULL default '0.00', `c_mode` int(11) NOT NULL, `p_mode` int(11) NOT NULL, PRIMARY KEY (`rate_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `shipping_rates` -- -- -------------------------------------------------------- -- -- Table structure for table `shipping_table_rates` -- CREATE TABLE IF NOT EXISTS `shipping_table_rates` ( `rate_id` int(11) NOT NULL auto_increment, `c_id` int(11) NOT NULL, `p_id` int(11) NOT NULL, `c_stat` int(2) NOT NULL default '0', `p_stat` int(2) NOT NULL default '0', `c_ind` int(2) NOT NULL default '0', `p_ind` int(2) NOT NULL default '0', `c_tbl` decimal(20,2) NOT NULL default '0.00', `p_tbl` decimal(20,2) NOT NULL default '0.00', `p_qty` int(11) NOT NULL, `c_qty` int(11) NOT NULL, PRIMARY KEY (`rate_id`,`c_id`,`p_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `shipping_table_rates` -- Quote Link to comment Share on other sites More sharing options...
chrispopp8 Posted October 31, 2014 Share Posted October 31, 2014 Howdy @@rpdesign! I'm running 2.3.4 with Better Checkout. I did the install from ver 1.85 and then ran upgrades for 1.851 and 1.852. It took me a bit to figure out where the sql files were from that point but I discovered that I had to get them from an earlier version and then run update1.5 and update 1.8. (there's no mention of importing the SQL files in your documentation, btw... grrrrrr) There's a problem with Step 5, which says Add these lines to catalog/admin/includes/column_left.php //SSPP Beginrequire(DIR_WS_BOXES . 'separate_rate.php');//SSPP Endafter require(DIR_WS_BOXES . 'modules.php'); The problem is that there's no DIR_WS_BOXES in the column_left.php file. In fact, the string require(DIR_WS_BOXES . 'modules.php'); exists no where in OSC 2.3.4 so the person installing the add-on has no idea what to do at this point. Perhaps something is different with 2.3.4 (if so, it needs to be mentioned in the install) because after skipping 5 and 6 (not running PayPal) and installing the module, the box in the left column appears within the admin area. 1146 - Table 'oscommerce.shipping_mode' doesn't exist select distinct sr.p_id, `p_rate`, p_free, p_status, p_per, (p_rate * cb.customers_basket_quantity) as p_qty, sr.c_id, `c_rate`, c_free, c_status, c_per,(c_rate * cb.customers_basket_quantity ) as c_qty, cb.customers_basket_quantity as quantity, sm.p_sep, sm.c_sep, sm.c_mode, sm.p_mode from shipping_rates sr, (select * from customers_basket where customers_id='7' ) cb inner join products_to_categories ptc on (ptc.products_id = cb.products_id) inner join shipping_mode sm where (p_status = '1' or c_status = '1' ) and (cb.products_id = sr.p_id or ptc.categories_id = sr.c_id) and (sm.p_id = sr.p_id and sr.c_id = sm.c_id) and (sm.c_sep = '1' or sm.p_sep = '1') and ((sm.c_mode= '0' or sm.c_mode= '1' or sm.c_mode = '2') or (sm.p_mode = '0' or sm.p_mode = '1' or sm.p_mode = '2')) or ((sr.p_free='1' and sr.c_free ='0') or (sr.p_free='0' and sr.c_free ='1') ) group by sr.p_id, sr.c_id [TEP STOP] I've ran the .sql files I have but there's now this problem, as @Malcom pointed out previously. Am lost at this point. Is there a .sql file that should be imported that I am missing? Is it something from an earlier build that didn't get included with the Full Package on 1.85? Does anyone have a copy of this SQL that I can import? If you need more info, let me know. Thanks, Chris Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted October 31, 2014 Share Posted October 31, 2014 @@chrispopp8 Chris, 1) With osC v2.3, there is no Column_Left.php, as all of boxes that are installed into either the Left or Right column(s) are installed through the Admin section. You can skip this step. 2) If you look at the code at the end of catalog/includes/modules/shipping/separate.php , you will see that when you first install this module, it will create the new tables, and modify the existing ones. You can either: a) uninstall the module and then re-install it. This should build the tables for you. Or, b) by examining the code in separate.php, you should be able to some up with the sql code needed to manually create the table(s) using something like phpMyAdmin HTH Malcolm Quote Link to comment Share on other sites More sharing options...
rpdesign Posted November 2, 2014 Author Share Posted November 2, 2014 @@Dirk Duckler 1146 - Table 'houseofhid.TABLE_SHIPPING_MODE' doesn't existselect c_mode, c_sep from TABLE_SHIPPING_MODE where c_id =113[TEP STOP] This is a simple one! You just need to define the table in admin/includes/database.php with a define statement. so it should read define(TABLE_SHIPPING_MODE,'shipping_mode'); :thumbsup: B) [follow step 2 (w00t) of the installation file] @@chrispopp8 yes this is because my module works with a logged in customer only at this time and i am looking into fixing this for guests as well as logged in customers. Ahhh i see Malcome has answered your question. But rest assured i'll be working on my module over thanksgiving . NOTE: I WILL BE WORKING ON V1.86 OF MY MODULE SHORTLY AND WILL MAKE IT BETTER (w00t) I WILL ALSO BE WORKING ON A BETTER VERSION OF MY INSTALL FILE SO PLEASE GIVE ME SUGGESTIONS. I WILL BE OUT OF FALL SEMESTER ON DECEMBER 15TH and will be able to work and take a stronger look at my module. Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
chrispopp8 Posted November 3, 2014 Share Posted November 3, 2014 Thanks @Malcom and @@rpdesign for your answers! Looking forward to having shipping tables for guests as that's how we want to sell - we will want the customer to create an account to follow their order status and capture their contact data (we're not using the newsletter/email engine on OSC) but only after they make the purchase. The thought is get them to buy first and not let signing up for anything before the sale is completed become a deterrent in making the sale. Quote Link to comment Share on other sites More sharing options...
rpdesign Posted November 16, 2014 Author Share Posted November 16, 2014 @@chrispopp8 sound good :thumbsup: and i'm looking forward to implementing this into my module :D The new version 2.0 will be a total rework of how it is installed and be modular in design. Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
Guest Posted November 16, 2014 Share Posted November 16, 2014 how do i resovle this issue. 1054 - Unknown column 'p_rate' in 'field list'select distinct p_id, `p_rate`, p_free, p_status, p_per, (p_rate * cb.customers_basket_quantity) as p_qty, c_id, `c_rate`, c_free, c_status, c_per,(c_rate * cb.customers_basket_quantity ) as c_qty, cb.customers_basket_quantity as quantity from TABLE_SHIPPING_RATES , (select * from customers_basket where customers_id='1' ) cb inner join products_to_categories ptc on (ptc.products_id = cb.products_id) where (p_status = '1' or c_status = '1' ) and (cb.products_id = p_id or ptc.categories_id = c_id) and (p_free = '0' and c_free = '0')[TEP STOP] Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted November 17, 2014 Share Posted November 17, 2014 (edited) @@anthonycomp When you installed this module in the admin area, it automatically creates the necessary tables. It looks like a field or table was not created. Go into your admin area, un-install the Separate Shipping module, and then re-install it. This *should* rebuild the necessary tables and fields. Malcolm Edited November 17, 2014 by ArtcoInc Quote Link to comment Share on other sites More sharing options...
rpdesign Posted November 17, 2014 Author Share Posted November 17, 2014 have you put a rate in for that product? Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
Guest Posted November 17, 2014 Share Posted November 17, 2014 I entered in all the product shipping price. And I am still havening same issues. I tried reinstalling module SSPP . I priced shipping on each product and I am get the same error message. Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted November 17, 2014 Share Posted November 17, 2014 Can you use something like phpMyAdmin and check to see if the fields are in the table? Malcolm Quote Link to comment Share on other sites More sharing options...
rpdesign Posted November 19, 2014 Author Share Posted November 19, 2014 @@anthonycomp Please add some screen shots of your configurations as this will help considerably as well as the error message. I am the developer and can help you with the problem if i know what you are trying to do and what version as well as what you have modified if any of my module. Screenshots always help. :thumbsup: RULES FOR ASKING FOR HELP: 1. Take screenshots of both the main configuration and of the secondary configuration as well as the shopping cart side 2. describe what has happened to bring you to the error not this error showed up please help [generalizations such as this do not help as i do not know what you did or did not do to get the error]. Some of the time it is my code but most of the time you have not installed properly or configured properly 3. Allow time for me to look into your problem and find a solution. I do this in my free time so i ask that you be patient Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted November 19, 2014 Author Share Posted November 19, 2014 @@anthonycomp lol i figured it out ! 1054 - Unknown column 'p_rate' in 'field list'select distinct p_id, `p_rate`, p_free, p_status, p_per, (p_rate * cb.customers_basket_quantity) as p_qty, c_id, `c_rate`, c_free, c_status, c_per,(c_rate * cb.customers_basket_quantity ) as c_qty, cb.customers_basket_quantity as quantity from TABLE_SHIPPING_RATES , (select * from customers_basket where customers_id='1' ) cb inner join products_to_categories ptc on (ptc.products_id = cb.products_id) where (p_status = '1' or c_status = '1' ) and (cb.products_id = p_id or ptc.categories_id = c_id) and (p_free = '0' and c_free = '0') you have not followed step 2 of my instructions for the catalog/includes/database_tables.php and i quote from the install file. Step 2Add these lines to BOTH catalog/includes/database_tables.php AND catalog/admin/includes/database_tables.php//SSPP [separate Shipping Per Product]define('TABLE_SHIPPING_RATES', 'shipping_rates');define('TABLE_SHIPPING_TABLE_RATES', 'shipping_table_rates');define('TABLE_SHIPPING_MODE', 'shipping_mode'); // added for v1.85//SSPP End Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted November 27, 2014 Author Share Posted November 27, 2014 Note: demo.r-pdesign.com and demo2.r-pdesign.com are currently down I ran out of funds to keep them running so you will not be able to see the live demo sites for my modules. :( I'm currently working on getting them back up and running with a new server within the next month or two. Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rwood Posted February 12, 2015 Share Posted February 12, 2015 If anyone is still reading this discussion, I'm having one small difficulty, and could use some clarification. What does the following instruction mean? It seems to be saying to add those lines after require(DIR_WS_BOXES . 'modules.php'); but there is no require(DIR_WS_BOXES . 'modules.php'); in that file. If it means add it afterwards, where, exactly does this code go? Step 5Add these lines to catalog/admin/includes/column_left.php //SSPP Beginrequire(DIR_WS_BOXES . 'separate_rate.php');//SSPP Endafterrequire(DIR_WS_BOXES . 'modules.php'); Quote Link to comment Share on other sites More sharing options...
rwood Posted February 13, 2015 Share Posted February 13, 2015 Is there an updated version of this addon for Oscommerce v.2.3.4? I'm running into problems with the code looking for fields in the DB tables that don't exist. The latest one is: 1054 - Unknown column 'c_per' in 'field list'select rate_id, c_rate, c_status, c_free, c_per from shipping_rates where c_id =22 Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted February 13, 2015 Share Posted February 13, 2015 (edited) @@rwood If anyone is still reading this discussion, I'm having one small difficulty, and could use some clarification. What does the following instruction mean? It seems to be saying to add those lines after require(DIR_WS_BOXES . 'modules.php'); but there is no require(DIR_WS_BOXES . 'modules.php'); in that file. If it means add it afterwards, where, exactly does this code go? Step 5Add these lines to catalog/admin/includes/column_left.php //SSPP Beginrequire(DIR_WS_BOXES . 'separate_rate.php');//SSPP Endafterrequire(DIR_WS_BOXES . 'modules.php'); There is no column_left.php file in osC 234. You can ignore this instruction. Is there an updated version of this addon for Oscommerce v.2.3.4? I'm running into problems with the code looking for fields in the DB tables that don't exist. The latest one is: 1054 - Unknown column 'c_per' in 'field list'select rate_id, c_rate, c_status, c_free, c_per from shipping_rates where c_id =22 The last step of the instructions says: Step 7 Enable Separate Shipping by pressing the install button from within the shipping modules area of admin. Doing so creates the new tables shipping_rates, shipping_table_rates, and shipping_mode, along with all of the fields. If your tables don't have all of the required fields, try un-installing and re-installing the module. Also, see this answer above: http://www.oscommerce.com/forums/topic/391994-sspp-separate-shipping-per-product-support-forum/?p=1708911 Malcolm Edited February 13, 2015 by ArtcoInc Quote Link to comment Share on other sites More sharing options...
rwood Posted February 14, 2015 Share Posted February 14, 2015 Thanks for the reply, Malcolm. I'm really stuck, here. I'm running v2.3.4. I'm looking at the file structure, and I can see this file: catalog/admin/includes/column_left.php On the tables: I started with the latest version of this addon (1.852). I followed the instructions, but ran into the roadblock concerning column_left.php. The tables were not automatically created at install, even though every other element was. Do you know where the SQL query code is that creates the tables? I see that in the first release (1.00) there are SQL files that can be manually imported into the DB. I also see that in the latest release, there is an SQL file that adds a few fields to two tables, and creates a third (if it doesn't already exist). This is all pretty confusing - not because I don't know how to do any and all of these steps - but because the instructions don't make sense. I'll try uninstalling and reinstalling the addon, and see what happens, but it seems to me that there was never a finished & clean contribution made available for download. Is there one newer than 1.852? Thanks for the help! Rob Wood Quote Link to comment Share on other sites More sharing options...
rwood Posted February 14, 2015 Share Posted February 14, 2015 My problem is that although the shipping module seems to be installing, it isn't. The tables are not being created on install, even though there is no indication of a failure. Even building the tables manually using the "create table" SQL in separate.php does not enable the module at checkout. At checkout, I see this error message: Shipping is currently not available for the selected shipping address. Please select or create a new shipping address to use with your purchase. Doing so does not work. The strange thing is that the module appears to be working properly in Admin, in that it lets me add new table rate weights/prices. Any ideas? Thanks, Rob Quote Link to comment Share on other sites More sharing options...
rpdesign Posted February 18, 2015 Author Share Posted February 18, 2015 (edited) @@rwood Hi i am the developer of this module and will address your concerns. I have been busy with school and such but if you want you can get a hold of me through my personal email or any one of the main contacts listed in the modules install file. Email is best :) I check the forums every other week for reply's to it ok i had an eureka moment! Do you have zone shipping installed? or any other shipping modules? their code might be interfering and if so i might be able to help code for compatibility :thumbsup: @@ArtcoInc Thanks for helping out with the load of people. :thumbsup: :thumbsup: I am in debt lol. Edited February 18, 2015 by rpdesign Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted June 8, 2015 Author Share Posted June 8, 2015 Note new features to be added want your input. Hi everyone, I want your input on a couple features for this module. list below. 1) A new language module for SSPP that allows for easy translating of SSPP text 2) A way to only install the tables that are needed. On demand installs. For ex: if you only want to have table rates but not flat rates only table rates show up in the configuration [This hopefully makes it less complicated] 3) Would you like different versions of SSPP? This is in response to option 2 above. 4) Any other thoughts? I would like to produce a module that does not care if the customer is logged in or not. 5) should step 7 be the first step in the install files? 6) Country zone shipping module to be added. Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
ArtcoInc Posted June 9, 2015 Share Posted June 9, 2015 @@rpdesign Robert, As you and I have discussed several times, a Guest Checkout feature is almost a necessity for a store these days. There are at least two popular Guest Checkout modules available, and I am using them in my stores. So, IMHO, your module will have to work with both of them. Malcolm Quote Link to comment Share on other sites More sharing options...
rpdesign Posted June 11, 2015 Author Share Posted June 11, 2015 @@ArtcoInc Right but in order to code for them i need to see the modules. And I do this with no money or help or donations. Just my free time. I do not have all the resources of a big conglomerate corporation with all the resources at their disposal. Along with getting my AAS Degree from TMCC I am currently living in a program for homeless Veterans with no money. my income without the student loans from last year was $2900 period [i worked at an internship for 3 months last year]. With my student loans it was $12900 of which aprox $6000 was used for tuition and books. My income last month was $0. I do not have work and would like work, I do not have access to a computer all the time, my laptop and tablet both have been pawned. Now with all this being said, I try to do the best i can. Quote Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
ArtcoInc Posted June 11, 2015 Share Posted June 11, 2015 @@rpdesign Of the two I am using in my stores, one is a free add-on: http://addons.oscommerce.com/info/9142 The other, alas, is a commercial product: http://bettercheckout.com/ Malcolm 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.