WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
Fatal error: Call to a member function numRows() on a non-object in /Applications/AMPPS/www/test/baker/modules/bakery/modify.php on line 52
---- Table structure for table `wb_mod_bakery_attributes`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_attributes` ( `attribute_id` int(6) NOT NULL AUTO_INCREMENT, `option_id` int(6) NOT NULL, `attribute_name` varchar(50) NOT NULL, PRIMARY KEY (`attribute_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_customer`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_customer` ( `order_id` int(6) NOT NULL AUTO_INCREMENT, `order_date` int(11) NOT NULL, `shipping_fee` decimal(9,2) NOT NULL, `sales_tax` decimal(9,2) NOT NULL, `submitted` varchar(20) NOT NULL DEFAULT 'no', `transaction_id` varchar(50) NOT NULL DEFAULT 'none', `transaction_status` varchar(10) NOT NULL DEFAULT 'none', `status` varchar(20) NOT NULL DEFAULT 'none', `user_id` int(6) NOT NULL, `cust_company` varchar(50) NOT NULL, `cust_first_name` varchar(50) NOT NULL, `cust_last_name` varchar(50) NOT NULL, `cust_tax_no` varchar(11) NOT NULL, `cust_street` varchar(50) NOT NULL, `cust_city` varchar(50) NOT NULL, `cust_state` varchar(50) NOT NULL, `cust_country` varchar(2) NOT NULL, `cust_zip` varchar(10) NOT NULL, `cust_email` varchar(50) NOT NULL, `cust_phone` varchar(20) NOT NULL, `ship_company` varchar(50) NOT NULL, `ship_first_name` varchar(50) NOT NULL, `ship_last_name` varchar(50) NOT NULL, `ship_street` varchar(50) NOT NULL, `ship_city` varchar(50) NOT NULL, `ship_state` varchar(50) NOT NULL, `ship_country` varchar(2) NOT NULL, `ship_zip` varchar(10) NOT NULL, `invoice_id` int(6) NOT NULL, `invoice` text NOT NULL, PRIMARY KEY (`order_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_images`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_images` ( `img_id` int(11) NOT NULL AUTO_INCREMENT, `item_id` int(11) NOT NULL DEFAULT '0', `item_attribute_id` int(11) NOT NULL DEFAULT '0', `filename` varchar(150) NOT NULL DEFAULT '', `active` enum('1','0') NOT NULL DEFAULT '1', `position` int(11) NOT NULL DEFAULT '0', `alt` varchar(255) NOT NULL DEFAULT '', `title` varchar(255) NOT NULL DEFAULT '', `caption` text NOT NULL, PRIMARY KEY (`img_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_items`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_items` ( `item_id` int(11) NOT NULL AUTO_INCREMENT, `section_id` int(11) NOT NULL DEFAULT '0', `page_id` int(11) NOT NULL DEFAULT '0', `group_id` int(11) NOT NULL DEFAULT '0', `active` int(11) NOT NULL DEFAULT '0', `position` int(11) NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL DEFAULT '', `sku` varchar(20) NOT NULL DEFAULT '', `stock` varchar(20) NOT NULL DEFAULT '', `price` decimal(9,2) NOT NULL, `shipping` decimal(9,2) NOT NULL, `tax_rate` decimal(5,2) NOT NULL, `definable_field_0` varchar(150) NOT NULL DEFAULT '', `definable_field_1` varchar(150) NOT NULL DEFAULT '', `definable_field_2` varchar(150) NOT NULL DEFAULT '', `link` text NOT NULL, `description` text NOT NULL, `full_desc` text NOT NULL, `modified_when` int(11) NOT NULL DEFAULT '0', `modified_by` int(11) NOT NULL DEFAULT '0', `created_when` int(11) NOT NULL DEFAULT '0', `created_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`item_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;---- Dumping data for table `wb_mod_bakery_items`--INSERT INTO `wb_mod_bakery_items` (`item_id`, `section_id`, `page_id`, `group_id`, `active`, `position`, `title`, `sku`, `stock`, `price`, `shipping`, `tax_rate`, `definable_field_0`, `definable_field_1`, `definable_field_2`, `link`, `description`, `full_desc`, `modified_when`, `modified_by`, `created_when`, `created_by`) VALUES(1, 0, 0, 0, 0, 0, '', '', '', 0.00, 0.00, 0.00, '', '', '', '', '', '', 0, 0, 0, 0);-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_item_attributes`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_item_attributes` ( `assign_id` int(6) NOT NULL AUTO_INCREMENT, `item_id` int(6) NOT NULL, `option_id` int(6) NOT NULL, `attribute_id` int(6) NOT NULL, `price` decimal(9,2) NOT NULL, `operator` varchar(1) NOT NULL, PRIMARY KEY (`assign_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_options`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_options` ( `option_id` int(6) NOT NULL AUTO_INCREMENT, `option_name` varchar(50) NOT NULL, PRIMARY KEY (`option_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_order`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_order` ( `order_id` int(6) NOT NULL AUTO_INCREMENT, `item_id` int(5) NOT NULL, `attributes` varchar(50) NOT NULL, `sku` varchar(20) NOT NULL, `quantity` int(7) NOT NULL, `price` decimal(9,2) NOT NULL, `tax_rate` decimal(5,2) NOT NULL, PRIMARY KEY (`order_id`,`item_id`,`attributes`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_page_settings`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_page_settings` ( `section_id` int(11) NOT NULL DEFAULT '0', `page_id` int(11) NOT NULL DEFAULT '0', `page_offline` enum('yes','no') NOT NULL DEFAULT 'no', `offline_text` tinytext NOT NULL, `continue_url` int(11) NOT NULL, `header` text NOT NULL, `item_loop` text NOT NULL, `footer` text NOT NULL, `item_header` text NOT NULL, `item_footer` text NOT NULL, `items_per_page` int(11) NOT NULL DEFAULT '0', `num_cols` int(11) NOT NULL DEFAULT '3', `resize` int(11) NOT NULL DEFAULT '100', `lightbox2` varchar(10) NOT NULL DEFAULT 'detail', PRIMARY KEY (`section_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;---- Dumping data for table `wb_mod_bakery_page_settings`--INSERT INTO `wb_mod_bakery_page_settings` (`section_id`, `page_id`, `page_offline`, `offline_text`, `continue_url`, `header`, `item_loop`, `footer`, `item_header`, `item_footer`, `items_per_page`, `num_cols`, `resize`, `lightbox2`) VALUES(0, 0, 'no', '', 0, '', '', '', '', '', 0, 3, 100, 'detail'),(2, 2, 'no', 'The Shop XXX is offline for maintenance until XXX. Please come back later.<br />Sorry for any inconvenience.', 2, '<div class="mod_bakery_main_div_cart_bt_f">\n<form action="[SHOP_URL]" method="post">\n<input type="submit" name="view_cart" class="mod_bakery_bt_cart_f" value="[VIEW_CART]" />\n</form>\n</div>\n<table cellpadding="5" cellspacing="0" border="0" width="98%">\n<tr>\n', '<td class="mod_bakery_main_td_f">\n[THUMB]\n<br />\n<a href="[LINK]"><span class="mod_bakery_main_title_f">[TITLE]</span></a>\n<br />\n[DESCRIPTION]\n<br />\n[TXT_PRICE]: [CURRENCY] [PRICE]\n<br />\n[TXT_STOCK]: [STOCK]\n<br />\n<form action="[SHOP_URL]" method="post">\n[OPTION]\n<br />\n<input type="text" name="item[ITEM_ID]" class="mod_bakery_main_input_f" value="1" size="2" />\n<input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />\n</form>\n</td>', '</tr>\n</table>\n<table cellpadding="0" cellspacing="0" border="0" width="98%" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]">\n<tr>\n<td colspan="3" align="left"><hr /></td>\n</tr>\n<tr>\n<td width="35%" align="left">[PREVIOUS_PAGE_LINK]</td>\n<td width="30%" align="center">[TXT_ITEM] [OF] </td>\n<td width="35%" align="right">[NEXT_PAGE_LINK]</td>\n</tr>\n</table>', '<center>', '[IMAGE]\n<form action="[SHOP_URL]" method="post">\n<table border="0" cellspacing="0" cellpadding="5" class="mod_bakery_item_table_f">\n<tr>\n<td colspan="2" align="left" valign="top"><h2 class="mod_bakery_item_title_f">[TITLE]</h2></td>\n</tr>\n<tr>\n<td align="left" valign="top"><span class="mod_bakery_item_sku_f">[TXT_SKU]:</span></td>\n<td align="left" valign="top">[SKU]</td>\n</tr>\n<tr>\n<td align="left" valign="top"><span class="mod_bakery_item_price_f">[TXT_PRICE]:</span></td>\n<td align="left" valign="top">[CURRENCY] [PRICE]</td>\n</tr>\n<tr>\n<td align="left" valign="top"><span class="mod_bakery_item_shipping_f">[TXT_SHIPPING]:</span></td>\n<td align="left" valign="top">[CURRENCY] [SHIPPING] </td>\n</tr>\n<tr>\n<td align="left" valign="top"><span class="mod_bakery_item_stock_f">[TXT_STOCK]:</span></td>\n<td align="left" valign="top">[STOCK]</td>\n</tr>\n<tr> \n<td align="left" valign="top"><span class="mod_bakery_item_full_desc_f"><p>[TXT_FULL_DESC]:</p></span></td>\n<td align="left" valign="top">[FULL_DESC]</td>\n</tr>\n<tr> \n<td align="left" valign="top"><span class="mod_bakery_shipping_cost_f">[TXT_SHIPPING_COST]:</span></td>\n<td align="left" valign="top">\n[TXT_DOMESTIC]: [CURRENCY] [SHIPPING_DOMESTIC]<br />\n[TXT_ABROAD]: [CURRENCY] [SHIPPING_ABROAD]</td>\n</tr>\n[OPTION]\n<tr> \n<td align="left" valign="top"> </td>\n<td align="left" valign="top">\n<input type="text" name="item[ITEM_ID]" class="mod_bakery_item_input_f" value="1" size="2" />\n<input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />\n</td>\n</tr>\n</table>\n</form>\n[PREVIOUS] | <a href="[BACK]">[TXT_BACK]</a> | [NEXT]\n</center>\n<br />', 0, 3, 100, 'detail');-- ------------------------------------------------------------ Table structure for table `wb_mod_bakery_payment_methods`--CREATE TABLE IF NOT EXISTS `wb_mod_bakery_payment_methods` ( `pm_id` int(11) NOT NULL AUTO_INCREMENT, `active` int(1) NOT NULL, `directory` varchar(50) NOT NULL, `name` varchar(50) NOT NULL, `version` varchar(6) NOT NULL, `author` varchar(50) NOT NULL, `requires` varchar(6) NOT NULL, `field_1` varchar(150) NOT NULL, `value_1` text NOT NULL, `field_2` varchar(150) NOT NULL, `value_2` text NOT NULL, `field_3` varchar(150) NOT NULL, `value_3` text NOT NULL, `field_4` varchar(150) NOT NULL, `value_4` text NOT NULL, `field_5` varchar(150) NOT NULL, `value_5` text NOT NULL, `field_6` varchar(150) NOT NULL, `value_6` text NOT NULL, `cust_email_subject` text NOT NULL, `cust_email_body` text NOT NULL, `shop_email_subject` text NOT NULL, `shop_email_body` text NOT NULL, PRIMARY KEY (`pm_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
QuoteFatal error: Call to a member function numRows() on a non-object in /Applications/AMPPS/www/test/baker/modules/bakery/modify.php on line 52Check the syntax from your sql statement, Most of them solve your issue
<?php$query_general_settings = $database->query("SELECT shop_name, display_settings FROM ".TABLE_PREFIX."mod_bakery_general_settings");
<?php$query_general_settings = $database->query("SELECT shop_name, display_settings FROM ".TABLE_PREFIX."mod_bakery_general_settings"); $num = $query_general_settings->numRows();
. "`free_shipping` DECIMAL(7,2) NOT NULL DEFAULT '9999999' ,"
. "`free_shipping` DECIMAL(7,2) NOT NULL DEFAULT '100' ,"
I can change to 9999999 from general settings with no issue
Fatal error: Call to a member function numRows() on a non-object in .../modules/bakery/modify.php on line 52
Code: [Select]. "`free_shipping` DECIMAL(7,2) NOT NULL DEFAULT '9999999' ,"
No table mod_bakery_general_ settings was created.After changing in install.php line 173 from '9999999' to '999' and installing again (Add-Ons > Modules > Advanced) it works.
For example, a DECIMAL(18,9) column has nine digits on either side of the decimal point, so the integer part and the fractional part each require 4 bytes. A DECIMAL(20,6) column has fourteen integer digits and six fractional digits. The integer digits require four bytes for nine of the digits and 3 bytes for the remaining five digits. The six fractional digits require 3 bytes.
There is no comma or point in 9999999
The result of our investigations is what?Remove 2 digits from the installer?
. "`free_shipping` DECIMAL(7,2) NOT NULL DEFAULT '99999.99' ,"