How to run and mod a AppGini project a vendor set up for me
Posted: 2013-07-18 18:05
I had a contractor write me a project using AppGini. The problem I have now is the vendor is no longer around and when I try to contact them, they are unwilling to give me any support. This is what I have always hated about the software and technology industry. You work with a vendor who promises a completed project and as soon as something else comes along, they are gone. Anyway, I have and AppGini application I call Inventory Master. It takes a file that is provided to me in a CSV format and it is converted and loaded into my website that is based on a OpenCart platform. Below is a sample of one of the five scripts that are run to do an inventory update using a csv file called newsku and filter it and then push it into my invdb file.
I am looking for a little direction getting started with Appgini and executing the sql function below. I also believe that I do not have top administrative access to the AppGini application and wonder if there is a backdoor or a way to get into any of the php files that contain the actual top level user name and password so that I can reset them. I can FTP into all my AppGini files, just not sure which file to look at to pull out the top level Admin.
use hardwat3_invdb;
UPDATE inv_master
INNER JOIN newskuinfo ON inv_master.sku = newskuinfo.sku
SET inv_master.sku = newskuinfo.sku,
inv_master.upc = newskuinfo.upc,
inv_master.status =
CASE
when newskuinfo.quantity = '0' and newskuinfo.status NOT LIKE 'CANCELLED' then 'INACTIVE'
else newskuinfo.status
END,
inv_master.ace_retail =
CASE
when newskuinfo.ace_retail LIKE '%A%' then replace(newskuinfo.ace_retail, 'A', '.')
when newskuinfo.ace_retail LIKE '%B%' then replace(newskuinfo.ace_retail, 'B', '.')
when newskuinfo.ace_retail LIKE '%C%' then replace(newskuinfo.ace_retail, 'C', '.')
ELSE newskuinfo.ace_retail
END,
inv_master.ace_qty = newskuinfo.quantity,
inv_master.ace_mult = newskuinfo.order_mult,
inv_master.order_mult = newskuinfo.order_mult,
inv_master.mfg = newskuinfo.mfg,
inv_master.vendor_name = newskuinfo.vendor_name,
inv_master.om_weight = newskuinfo.om_weight,
inv_master.brandname = newskuinfo.brandname,
inv_master.short_desc = newskuinfo.short_desc,
inv_master.each_cost =
CASE
when newskuinfo.each_cost LIKE '%A%' then replace(newskuinfo.each_cost, 'A', '.')
when newskuinfo.each_cost LIKE '%B%' then replace(newskuinfo.each_cost, 'B', '.')
when newskuinfo.each_cost LIKE '%C%' then replace(newskuinfo.each_cost, 'C', '.')
ELSE newskuinfo.each_cost
END,
/*inv_master.prod_class = newskuinfo.prod_class,*/
inv_master.prod_group = newskuinfo.prod_group,
inv_master.exp_desc = newskuinfo.exp_desc,
inv_master.ship_ups = newskuinfo.ship_ups,
inv_master.long_desc = newskuinfo.long_desc,
inv_master.tvo_retail =
CASE
when newskuinfo.tvo_retail LIKE '%A%' then replace(newskuinfo.tvo_retail, 'A', '.')
when newskuinfo.tvo_retail LIKE '%B%' then replace(newskuinfo.tvo_retail, 'B', '.')
when newskuinfo.tvo_retail LIKE '%C%' then replace(newskuinfo.tvo_retail, 'C', '.')
ELSE newskuinfo.tvo_retail
END,
inv_master.tvo_mult = newskuinfo.tvo_mult;
/*where inv_master.lock_data is null;*/
/* STEP 2 - Add new records from acenet to inventory where based on UPC code */
use hardwat3_invdb;
DROP TEMPORARY TABLE IF EXISTS new_inv;
CREATE TEMPORARY TABLE new_inv (
sku char(20),
skux char(20),
upc char(100),
status char(20),
ace_retail Char(10),
quantity int(20),
order_mult char(5),
mfg char(20),
vendor_name char(100),
om_weight char(4),
brandname char(100),
short_desc char(10),
each_cost char(100),
prod_class int(10),
prod_group int(10),
exp_desc char(200),
ship_ups char(10),
long_desc TEXT,
tvo_retail decimal(8,2),
tvo_mult int(4)
);
INSERT INTO new_inv (
skux,
sku,
upc,
status,
ace_retail,
quantity,
order_mult,
mfg,
vendor_name,
om_weight,
brandname,
short_desc,
each_cost,
prod_class,
prod_group,
exp_desc,
ship_ups,
long_desc,
tvo_retail,
tvo_mult
)
Select inv_master.sku,
newskuinfo.sku,
newskuinfo.upc,
CASE
when newskuinfo.quantity = '0' and newskuinfo.status NOT LIKE 'CANCELLED' then 'INACTIVE'
when newskuinfo.quantity is null and newskuinfo.status NOT LIKE 'CANCELLED' then 'INACTIVE'
else newskuinfo.status
END,
CASE
when newskuinfo.ace_retail LIKE '%A%' then replace(newskuinfo.ace_retail, 'A', '.')
when newskuinfo.ace_retail LIKE '%B%' then replace(newskuinfo.ace_retail, 'B', '.')
when newskuinfo.ace_retail LIKE '%C%' then replace(newskuinfo.ace_retail, 'C', '.')
ELSE newskuinfo.ace_retail
END,
/* qty = newskuinfo.qty / 10 (1-25) / newskuinfo.order_mult */
newskuinfo.quantity,
newskuinfo.order_mult,
newskuinfo.mfg,
newskuinfo.vendor_name,
newskuinfo.om_weight,
newskuinfo.brandname,
newskuinfo.short_desc,
CASE
when newskuinfo.each_cost LIKE '%A%' then replace(newskuinfo.each_cost, 'A', '.')
when newskuinfo.each_cost LIKE '%B%' then replace(newskuinfo.each_cost, 'B', '.')
when newskuinfo.each_cost LIKE '%C%' then replace(newskuinfo.each_cost, 'C', '.')
ELSE newskuinfo.each_cost
END,
newskuinfo.prod_class,
newskuinfo.prod_group,
newskuinfo.exp_desc,
newskuinfo.ship_ups,
newskuinfo.long_desc,
CASE
when newskuinfo.tvo_retail LIKE '%A%' then replace(newskuinfo.tvo_retail, 'A', '.')
when newskuinfo.tvo_retail LIKE '%B%' then replace(newskuinfo.tvo_retail, 'B', '.')
when newskuinfo.tvo_retail LIKE '%C%' then replace(newskuinfo.tvo_retail, 'C', '.')
ELSE newskuinfo.tvo_retail
END,
newskuinfo.tvo_mult
FROM newskuinfo Left OUTER JOIN inv_master ON newskuinfo.sku = inv_master.sku
where inv_master.sku is null;
select * from new_inv where skux is null;
INSERT INTO inv_master ( sku,
upc,
status,
ace_retail,
quantity,
mfg,
vendor_name,
om_weight,
brandname,
price,
AZ_ID,
EB_ID,
short_desc,
each_cost,
order_mult,
prod_class,
prod_group,
exp_desc,
ship_ups,
long_desc,
tvo_retail,
tvo_mult,
OC_ID
)
SELECT new_inv.sku,
new_inv.upc,
new_inv.status,
new_inv.ace_retail,
new_inv.quantity,
new_inv.mfg,
new_inv.vendor_name,
new_inv.om_weight,
new_inv.brandname,
1.00,
'AZa',
'EBa',
new_inv.short_desc,
new_inv.each_cost,
new_inv.order_mult,
new_inv.prod_class,
new_inv.prod_group,
new_inv.exp_desc,
new_inv.ship_ups,
new_inv.long_desc,
new_inv.tvo_retail,
new_inv.tvo_mult,
'N'
FROM new_inv;
I am looking for a little direction getting started with Appgini and executing the sql function below. I also believe that I do not have top administrative access to the AppGini application and wonder if there is a backdoor or a way to get into any of the php files that contain the actual top level user name and password so that I can reset them. I can FTP into all my AppGini files, just not sure which file to look at to pull out the top level Admin.
use hardwat3_invdb;
UPDATE inv_master
INNER JOIN newskuinfo ON inv_master.sku = newskuinfo.sku
SET inv_master.sku = newskuinfo.sku,
inv_master.upc = newskuinfo.upc,
inv_master.status =
CASE
when newskuinfo.quantity = '0' and newskuinfo.status NOT LIKE 'CANCELLED' then 'INACTIVE'
else newskuinfo.status
END,
inv_master.ace_retail =
CASE
when newskuinfo.ace_retail LIKE '%A%' then replace(newskuinfo.ace_retail, 'A', '.')
when newskuinfo.ace_retail LIKE '%B%' then replace(newskuinfo.ace_retail, 'B', '.')
when newskuinfo.ace_retail LIKE '%C%' then replace(newskuinfo.ace_retail, 'C', '.')
ELSE newskuinfo.ace_retail
END,
inv_master.ace_qty = newskuinfo.quantity,
inv_master.ace_mult = newskuinfo.order_mult,
inv_master.order_mult = newskuinfo.order_mult,
inv_master.mfg = newskuinfo.mfg,
inv_master.vendor_name = newskuinfo.vendor_name,
inv_master.om_weight = newskuinfo.om_weight,
inv_master.brandname = newskuinfo.brandname,
inv_master.short_desc = newskuinfo.short_desc,
inv_master.each_cost =
CASE
when newskuinfo.each_cost LIKE '%A%' then replace(newskuinfo.each_cost, 'A', '.')
when newskuinfo.each_cost LIKE '%B%' then replace(newskuinfo.each_cost, 'B', '.')
when newskuinfo.each_cost LIKE '%C%' then replace(newskuinfo.each_cost, 'C', '.')
ELSE newskuinfo.each_cost
END,
/*inv_master.prod_class = newskuinfo.prod_class,*/
inv_master.prod_group = newskuinfo.prod_group,
inv_master.exp_desc = newskuinfo.exp_desc,
inv_master.ship_ups = newskuinfo.ship_ups,
inv_master.long_desc = newskuinfo.long_desc,
inv_master.tvo_retail =
CASE
when newskuinfo.tvo_retail LIKE '%A%' then replace(newskuinfo.tvo_retail, 'A', '.')
when newskuinfo.tvo_retail LIKE '%B%' then replace(newskuinfo.tvo_retail, 'B', '.')
when newskuinfo.tvo_retail LIKE '%C%' then replace(newskuinfo.tvo_retail, 'C', '.')
ELSE newskuinfo.tvo_retail
END,
inv_master.tvo_mult = newskuinfo.tvo_mult;
/*where inv_master.lock_data is null;*/
/* STEP 2 - Add new records from acenet to inventory where based on UPC code */
use hardwat3_invdb;
DROP TEMPORARY TABLE IF EXISTS new_inv;
CREATE TEMPORARY TABLE new_inv (
sku char(20),
skux char(20),
upc char(100),
status char(20),
ace_retail Char(10),
quantity int(20),
order_mult char(5),
mfg char(20),
vendor_name char(100),
om_weight char(4),
brandname char(100),
short_desc char(10),
each_cost char(100),
prod_class int(10),
prod_group int(10),
exp_desc char(200),
ship_ups char(10),
long_desc TEXT,
tvo_retail decimal(8,2),
tvo_mult int(4)
);
INSERT INTO new_inv (
skux,
sku,
upc,
status,
ace_retail,
quantity,
order_mult,
mfg,
vendor_name,
om_weight,
brandname,
short_desc,
each_cost,
prod_class,
prod_group,
exp_desc,
ship_ups,
long_desc,
tvo_retail,
tvo_mult
)
Select inv_master.sku,
newskuinfo.sku,
newskuinfo.upc,
CASE
when newskuinfo.quantity = '0' and newskuinfo.status NOT LIKE 'CANCELLED' then 'INACTIVE'
when newskuinfo.quantity is null and newskuinfo.status NOT LIKE 'CANCELLED' then 'INACTIVE'
else newskuinfo.status
END,
CASE
when newskuinfo.ace_retail LIKE '%A%' then replace(newskuinfo.ace_retail, 'A', '.')
when newskuinfo.ace_retail LIKE '%B%' then replace(newskuinfo.ace_retail, 'B', '.')
when newskuinfo.ace_retail LIKE '%C%' then replace(newskuinfo.ace_retail, 'C', '.')
ELSE newskuinfo.ace_retail
END,
/* qty = newskuinfo.qty / 10 (1-25) / newskuinfo.order_mult */
newskuinfo.quantity,
newskuinfo.order_mult,
newskuinfo.mfg,
newskuinfo.vendor_name,
newskuinfo.om_weight,
newskuinfo.brandname,
newskuinfo.short_desc,
CASE
when newskuinfo.each_cost LIKE '%A%' then replace(newskuinfo.each_cost, 'A', '.')
when newskuinfo.each_cost LIKE '%B%' then replace(newskuinfo.each_cost, 'B', '.')
when newskuinfo.each_cost LIKE '%C%' then replace(newskuinfo.each_cost, 'C', '.')
ELSE newskuinfo.each_cost
END,
newskuinfo.prod_class,
newskuinfo.prod_group,
newskuinfo.exp_desc,
newskuinfo.ship_ups,
newskuinfo.long_desc,
CASE
when newskuinfo.tvo_retail LIKE '%A%' then replace(newskuinfo.tvo_retail, 'A', '.')
when newskuinfo.tvo_retail LIKE '%B%' then replace(newskuinfo.tvo_retail, 'B', '.')
when newskuinfo.tvo_retail LIKE '%C%' then replace(newskuinfo.tvo_retail, 'C', '.')
ELSE newskuinfo.tvo_retail
END,
newskuinfo.tvo_mult
FROM newskuinfo Left OUTER JOIN inv_master ON newskuinfo.sku = inv_master.sku
where inv_master.sku is null;
select * from new_inv where skux is null;
INSERT INTO inv_master ( sku,
upc,
status,
ace_retail,
quantity,
mfg,
vendor_name,
om_weight,
brandname,
price,
AZ_ID,
EB_ID,
short_desc,
each_cost,
order_mult,
prod_class,
prod_group,
exp_desc,
ship_ups,
long_desc,
tvo_retail,
tvo_mult,
OC_ID
)
SELECT new_inv.sku,
new_inv.upc,
new_inv.status,
new_inv.ace_retail,
new_inv.quantity,
new_inv.mfg,
new_inv.vendor_name,
new_inv.om_weight,
new_inv.brandname,
1.00,
'AZa',
'EBa',
new_inv.short_desc,
new_inv.each_cost,
new_inv.order_mult,
new_inv.prod_class,
new_inv.prod_group,
new_inv.exp_desc,
new_inv.ship_ups,
new_inv.long_desc,
new_inv.tvo_retail,
new_inv.tvo_mult,
'N'
FROM new_inv;