Upgrade Instructions for Marketplace 1.3    (from 1.2 Versions)


Follow the instructions below to upgrade your current Marketplace and keep all your entries.


*** If you use Table-Prefixes you must insert them in all SQL-Statements below!!! ***


*** MAKE A BACKUP OF YOUR DATABASE BEFORE YOU START !!!!!!!!!!  ***



Database
--------

# 1. marketplace_config
ALTER TABLE `marketplace_config` DROP COLUMN `version`;
ALTER TABLE `marketplace_config` DROP COLUMN `language_file`;
ALTER TABLE `marketplace_config` ADD COLUMN `use_state` TINYINT(1) DEFAULT 0 AFTER `use_city`;


# 2. marketplace_ads
ALTER TABLE `marketplace_ads` ADD COLUMN `ad_type` INTEGER UNSIGNED DEFAULT 0 AFTER `ad_kindof`;
update marketplace_ads set ad_type=1 where ad_kindof='WTS';
update marketplace_ads set ad_type=2 where ad_kindof='WTB';
update marketplace_ads set ad_type=3 where ad_kindof='WTC';
ALTER TABLE `marketplace_ads` DROP COLUMN `ad_kindof`;
ALTER TABLE `marketplace_ads` ADD COLUMN `state` VARCHAR(50) DEFAULT "" AFTER `city`;


# 3. marketplace_types
CREATE TABLE IF NOT EXISTS `marketplace_types` (
	`id`               INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
	`name`          VARCHAR(80) DEFAULT NULL,
	`sort_order`    INTEGER DEFAULT '0',
	`published`     TINYINT(1) DEFAULT 0,
	PRIMARY KEY  (`id`),
	KEY `marketplace_types_name` (`name`),
	KEY `marketplace_types_sort_order` (`sort_order`)
) TYPE=MyISAM;

INSERT INTO `marketplace_types`( id, name, sort_order, published) VALUES ( 1, 'For Sale', 1, 1 );
INSERT INTO `marketplace_types`( id, name, sort_order, published) VALUES ( 2, 'Wanted', 2, 1 );
INSERT INTO `marketplace_types`( id, name, sort_order, published) VALUES ( 3, 'Want to change', 3, 1 );



# 4. marketplace backend for types

#Step A:  Get the Marketplace-Id from components and write it down!
SELECT id FROM components WHERE name='Marketplace'


#Step B:  replace the *YOURID* with your retrieved id in Step A: and execute the statement (After you replaced the id !!!)
INSERT INTO `components`
	( 	`name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`)
  VALUES
	( 'Type Manager', '', 0, *YOURID*, 'option=com_marketplace&act=types', 'Type Manager', 'com_marketplace', 3, 'js/ThemeOffice/component.png', 0 );






Filesystem
----------

1.
copy the following files to ./components/com_marketplace

delete_ad.php
footer.php
marketplace.css
marketplace.php
recent5.php
show_ad.php
show_category.php
show_index.php
show_rules.php
topmenu.php   (delete old 'topmenue.php')
write_ad.php


2.
delete all lang_*.php


3.
create directory ./components/com_marketplace/language and copy all language-files from the zipfile in it.


4.
replace the images:
./images/categories/default.gif
./images/system/*  (replace all here) Get the new images from the zip-file and copy them here in


5.
copy the following files to ./administrator/components/com_marketplace

admin.marketplace.php
admin.marketplace.html.php
install.marketplace.php
marketplace.class.php
toolbar.marketplace.php
toolbar.marketplace.html.php
uninstall.marketplace.php



That's it


Regards

Achim



