com_phocainstall_vm install fails

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
Lightworksgal
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Feb 2012, 05:43

com_phocainstall_vm install fails

Post by Lightworksgal »

Using com_phocainstall_vm creation date 23/10/2010 as downloaded from site, in order to work around a Joomla 1.5.23, VM 1.1.19 SQL install error, I made the following changes to the SQL table creation code to hardwire the table name, remove the TYPE statement, and to add the correct key creation for auto fields:

CREATE TABLE IF NOT EXISTS `jos_vm_bills` (
`vendor_id` INT(11) NOT NULL DEFAULT '0',
`bill_id` INT(11) NOT NULL AUTO_INCREMENT,
`delivery_id` INT(11) NOT NULL DEFAULT '0',
`order_id` INT(11) NOT NULL DEFAULT '0',
`obliterated` TINYINT(1) NOT NULL DEFAULT '0',
`due_date` INT(11) DEFAULT NULL,
`paid` TINYINT(1) NOT NULL DEFAULT '0',
`is_invoice` TINYINT(1) NOT NULL DEFAULT '0',
`delay_interest` DECIMAL(10,2) NOT NULL DEFAULT '0.00',
`cdate` INT(11) DEFAULT NULL,
`mdate` INT(11) DEFAULT NULL,
PRIMARY KEY (`vendor_id`,`bill_id`),
KEY `idx_bill_id` (`bill_id`),
KEY `idx_bills_delivery_id` (`delivery_id`),
KEY `idx_bills_obliterated` (`obliterated`),
KEY `idx_bills_is_invoice` (`is_invoice`)
);

CREATE TABLE IF NOT EXISTS `jos_vm_deliveries` (
`vendor_id` INT(11) NOT NULL DEFAULT '0',
`delivery_id` INT(11) NOT NULL AUTO_INCREMENT,
`order_id` INT(11) NOT NULL DEFAULT '0',
`user_id` INT(11) NOT NULL DEFAULT '0',
`cdate` INT(11) DEFAULT NULL,
`mdate` INT(11) DEFAULT NULL,
`obliterated` TINYINT(1) NOT NULL DEFAULT '0',
`obliterated_by` VARCHAR(50) DEFAULT NULL,
`obliterated_date` INT(11) DEFAULT NULL,
PRIMARY KEY (`vendor_id`,`delivery_id`),
KEY `idx_delivery_id` (`delivery_id`),
KEY `idx_deliveries_user_id` (`user_id`),
KEY `idx_deliveries_obliterated` (`obliterated`)
);

CREATE TABLE IF NOT EXISTS `jos_vm_delivery_item` (
`delivery_item_id` INT(11) NOT NULL AUTO_INCREMENT,
`delivery_id` INT(11) NOT NULL DEFAULT '0',
`order_id` INT(11) NOT NULL DEFAULT '0',
`vendor_id` INT(11) NOT NULL DEFAULT '0',
`order_item_id` INT(11) NOT NULL DEFAULT '0',
`obliterated` TINYINT(1) NOT NULL DEFAULT '0',
`product_quantity_delivered` INT(11) DEFAULT '0',
PRIMARY KEY (`delivery_item_id`),
KEY `idx_delivery_item_id` (`delivery_item_id`),
KEY `idx_delivery_item_delivery_id` (`delivery_id`),
KEY `idx_delivery_item_order_id` (`order_id`),
KEY `idx_delivery_item_vendor_id` (`vendor_id`),
KEY `idx_delivery_item_obliterated` (`obliterated`),
KEY `idx_delivery_item_order_item_id` (`order_item_id`)
);
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: com_phocainstall_vm install fails

Post by Jan »

Hi, thank you for this improvement.

Jan
If you find Phoca extensions useful, please support the project
Lightworksgal
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Feb 2012, 05:43

Re: com_phocainstall_vm install fails

Post by Lightworksgal »

You're most welcome.

I subsequently discovered that the addDelivery, saveDelivery... buttons failed, and tracked it down to missing inserts in the function table. So the fastest way to fix both create and function buttons issues is probably to follow your procedure for downloading the admin.install_delivery_sql.php file, adding the above edits:
2. Copy 'admin.install_delivery_sql.php':

FROM 'com_virtuemart_IDnR_addon.zip/administrator/components/com_virtuemart/html/admin.install_delivery_sql.php'
TO your server: 'administrator/components/com_virtuemart/html/admin.install_delivery_sql.php'

*** Added Step
2a. Alter the table create code in the file based on the edits above
*** end added step


3. Login as administrator into your site in administrator area. Copy the following URL link (change the [your-site] to your own site), paste it into the address bar of your browser and click enter on your keyboard:

[your-site]/administrator/index2.php?option=com_virtuemart&page=admin.install_delivery_sql.php
This script install necessary data into your database. After successfull installation of this data remove the 'admin.install_delivery_sql.php' FROM your server.
Post Reply