Jump to content

Prices = 0 !


espacioled

Recommended Posts

hi, i'm importing from OCart my store, and now ive a problem, i've items with attributes. 

 

Sometimes appears in catalog without stock, and any attributes have stock.

 

and other problem, is that in catalog and in cart appears price, but iside product page, price is 0.

 

i dont know if i have to fill any other table, for attributes, i'm filling or updating info in tables

 

UPDATE prstshp_product 
UPDATE prstshp_product_shop 
INSERT INTO prstshp_product_attribute_combination
INSERT INTO prstshp_product_attribute 
INSERT INTO prstshp_product_attribute_shop 
INSERT INTO prstshp_stock_available

 

 

Link to comment
Share on other sites

I suspect that you have no default attribute set. One of them has to be otherwise the price shows as 0. Many importers fail on this but you can test it out by going to one of the products via the back office and setting a default - if that fixes it then you'll have to either do them manually or via SQL I'm afraid.

Link to comment
Share on other sites

thanks, at this moment i'm using this code to add 3 attributes to one item.

 

i will check, thanks

 

 

set @article = 372;
set @atribut1 = 1;
set @atribut2 = 2;
set @atribut3 = 3;
 
 
delete from prstshp_product_attribute_combination WHERE prstshp_product_attribute_combination.id_product_attribute=(@article*100)+@atribut1;
delete from prstshp_product_attribute_combination WHERE prstshp_product_attribute_combination.id_product_attribute=(@article*100)+@atribut2;
delete from prstshp_product_attribute_combination WHERE prstshp_product_attribute_combination.id_product_attribute=(@article*100)+@atribut3;
 
delete from prstshp_product_attribute WHERE prstshp_product_attribute.id_product=@article;
delete from prstshp_stock_available WHERE prstshp_stock_available.id_product=@article;
delete from prstshp_product_attribute_shop WHERE prstshp_product_attribute_shop.id_product=@article;
 
UPDATE prstshp_product SET prstshp_product.cache_default_attribute = (@article*100)+@atribut, prstshp_product.quantity = 0 WHERE (((prstshp_product.id_product)=@article));
 
UPDATE prstshp_product_shop SET prstshp_product_shop.cache_default_attribute = (@article*100)+@atribut WHERE (((prstshp_product_shop.id_product)=@article));
 
 
INSERT INTO prstshp_product_attribute_combination ( id_attribute, id_product_attribute )
SELECT @atribut1 AS Expr1, (@article*100)+@atribut1 AS Expr2;
 
INSERT INTO prstshp_product_attribute ( id_product, id_product_attribute, wholesale_price, price, ecotax, quantity, weight, unit_price_impact,  minimal_quantity, reference, supplier_reference, location, ean13, upc )
SELECT @article AS Expr2, (@article*100)+@atribut1 AS Expr1, 0 AS Expr3, 0 AS Expr4, 0 AS Expr5, 0 AS Expr6, 0 AS Expr7, 0 AS Expr8,  1 AS Expr10, '' AS Expr11, '' AS Expr12, '' AS Expr13, '' AS Expr14, '' AS Expr15;
 
INSERT INTO prstshp_product_attribute_shop ( id_product, id_product_attribute, id_shop, wholesale_price, price, ecotax, weight, unit_price_impact,  minimal_quantity )
SELECT @article AS Expr2, (@article*100)+@atribut1 AS Expr1, 1 AS Expr6, 0 AS Expr3, 0 AS Expr4, 0 AS Expr5, 0 AS Expr7, 0 AS Expr8,  1 AS Expr10;
 
INSERT INTO prstshp_stock_available ( id_stock_available, id_product, id_product_attribute, id_shop, id_shop_group, quantity, depends_on_stock, out_of_stock )
SELECT (@article*1000)+@atribut1 AS Expr8, @article AS Expr1, (@article*100)+@atribut1 AS Expr2, 1 AS Expr4, 0 AS Expr5, 0 AS Expr3, 0 AS Expr6, 2 AS Expr7;
 
 
INSERT INTO prstshp_product_attribute_combination ( id_attribute, id_product_attribute )
SELECT @atribut2 AS Expr1, (@article*100)+@atribut2 AS Expr19;
 
INSERT INTO prstshp_product_attribute ( id_product, id_product_attribute, wholesale_price, price, ecotax, quantity, weight, unit_price_impact,  minimal_quantity, reference, supplier_reference, location, ean13, upc )
SELECT @article AS Expr2, (@article*100)+@atribut2 AS Expr19, 0 AS Expr3, 0 AS Expr4, 0 AS Expr5, 0 AS Expr6, 0 AS Expr7, 0 AS Expr8, 01 AS Expr10, '' AS Expr11, '' AS Expr12, '' AS Expr13, '' AS Expr14, '' AS Expr15;
 
INSERT INTO prstshp_product_attribute_shop ( id_product, id_product_attribute, id_shop, wholesale_price, price, ecotax, weight, unit_price_impact,  minimal_quantity )
SELECT @article AS Expr2, (@article*100)+@atribut2 AS Expr19, 1 AS Expr6, 0 AS Expr3, 0 AS Expr4, 0 AS Expr5, 0 AS Expr7, 0 AS Expr8, 1 AS Expr10;
 
INSERT INTO prstshp_stock_available ( id_stock_available, id_product, id_product_attribute, id_shop, id_shop_group, quantity, depends_on_stock, out_of_stock )
SELECT (@article*1000)+@atribut2 AS Expr8, @article AS Expr1, (@article*100)+@atribut2 AS Expr2, 1 AS Expr4, 0 AS Expr5, 0 AS Expr3, 0 AS Expr6, 2 AS Expr7;
 
 
INSERT INTO prstshp_product_attribute_combination ( id_attribute, id_product_attribute )
SELECT @atribut3 AS Expr1, (@article*100)+@atribut3 AS Expr19;
 
INSERT INTO prstshp_product_attribute ( id_product, id_product_attribute, wholesale_price, price, ecotax, quantity, weight, unit_price_impact,  minimal_quantity, reference, supplier_reference, location, ean13, upc )
SELECT @article AS Expr2, (@article*100)+@atribut3 AS Expr19, 0 AS Expr3, 0 AS Expr4, 0 AS Expr5, 0 AS Expr6, 0 AS Expr7, 0 AS Expr8, 1 AS Expr10, '' AS Expr11, '' AS Expr12, '' AS Expr13, '' AS Expr14, '' AS Expr15;
 
INSERT INTO prstshp_product_attribute_shop ( id_product, id_product_attribute, id_shop, wholesale_price, price, ecotax, weight, unit_price_impact,  minimal_quantity )
SELECT @article AS Expr2, (@article*100)+@atribut3 AS Expr19, 1 AS Expr6, 0 AS Expr3, 0 AS Expr4, 0 AS Expr5, 0 AS Expr7, 0 AS Expr8,  1 AS Expr10;
 
INSERT INTO prstshp_stock_available ( id_stock_available, id_product, id_product_attribute, id_shop, id_shop_group, quantity, depends_on_stock, out_of_stock )
SELECT (@article*1000)+@atribut3 AS Expr8, @article AS Expr1, (@article*100)+@atribut3 AS Expr2, 1 AS Expr4, 0 AS Expr5, 0 AS Expr3, 0 AS Expr6, 2 AS Expr7;
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...