Jump to content

Price 0,00 after import products


tom3k_21

Recommended Posts

hi everyone,
I had a problem, after importing products (via xml) some of them (only if product have a attribute (like 'size') are inactive, the weirdest thing is product have Quality > 0, and is marked as Active in ACP but on product page "Buy now" button is missing (attach file).
 
Tables I have changed with attributers maybe i miss something?:

if(isset($rozmiar)){

if(mysql_num_rows(mysql_query("SELECT id_attribute FROM ps_attribute_lang WHERE name = '".$rozmiar."'")) > 0){

$id_atrybutu = mysql_result(mysql_query("SELECT id_attribute FROM ps_attribute_lang WHERE name = '".$rozmiar."'"),0);

$id_product_atrybutu = mysql_result(mysql_query('SELECT id_product_attribute FROM ps_product_attribute_shop ORDER BY id_product_attribute DESC LIMIT 1'),0) + 1;

@mysql_query("INSERT INTO ps_product_attribute_combination (id_attribute, id_product_attribute) VALUES ('".$id_atrybutu."', '".$id_product_atrybutu."')");

@mysql_query("INSERT INTO ps_product_attribute (id_product_attribute, id_product) VALUES ('".$id_product_atrybutu."', '".$ps_product_id."')");

@mysql_query("INSERT INTO ps_product_attribute_shop (id_product_attribute, id_shop) VALUES ('".$id_product_atrybutu."', 1)");

} else {

$id_atrybutu = mysql_result(mysql_query('SELECT id_attribute FROM ps_attribute_lang ORDER BY id_attribute DESC LIMIT 1'),0) + 1;

$id_product_atrybutu = mysql_result(mysql_query('SELECT id_product_attribute FROM ps_product_attribute_shop ORDER BY id_product_attribute DESC LIMIT 1'),0) + 1;

@mysql_query("INSERT INTO ps_attribute_lang (id_attribute, id_lang, name) VALUES ('".$id_atrybutu."', 1, '".$rozmiar."')");

@mysql_query("INSERT INTO ps_attribute_shop (id_attribute, id_shop) VALUES ('".$id_atrybutu."', 1)");

@mysql_query("INSERT INTO ps_attribute (id_attribute, id_attribute_group, position) VALUES ('".$id_atrybutu."', 1, 4)");

@mysql_query("INSERT INTO ps_product_attribute_combination (id_attribute, id_product_attribute) VALUES ('".$id_atrybutu."', '".$id_product_atrybutu."')");

@mysql_query("INSERT INTO ps_product_attribute (id_product_attribute, id_product) VALUES ('".$id_product_atrybutu."', '".$ps_product_id."')");

@mysql_query("INSERT INTO ps_product_attribute_shop (id_product_attribute, id_shop) VALUES ('".$id_product_atrybutu."', 1)");

}

}

and table ps_stock_avaiable look like this:

 

if(isset($rozmiar)){
@mysql_query("REPLACE INTO ps_stock_available (id_product, id_shop, id_product_attribute, quantity, out_of_stock) VALUES ('".$ps_product_id."', 1, '".$id_product_atrybutu."', '".$stock2."', 2)");
} elseif(isset($rozmiarbuta)) {
@mysql_query("REPLACE INTO ps_stock_available (id_product, id_shop, id_product_attribute, quantity, out_of_stock) VALUES ('".$ps_product_id."', 1, '".$id_product_atrybutu2."', '".$stock2."', 2)");
} else {
@mysql_query("REPLACE INTO ps_stock_available (id_product, id_shop, id_product_attribute, quantity, out_of_stock) VALUES ('".$ps_product_id."', 1, 0, '".$stock2."', 2)");
}

post-473737-0-65547800-1399587560_thumb.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...