Jump to content

price show in product list is 0


Recommended Posts

Hello,

 

I have some troubles in my product lists. Some products show price 0,00, but the price is ok in the product page and in the back office. The debug smarty show that price is not loaded. I don't see any difference in the database with the other products. Please help.

Link to comment
Share on other sites

It's the latest, 1.5.2.

I thank you for your help, and sorry for my english, probably not pretty good ^^

I think there is no module working with price, but this website was in ps 1.4, with many modules, and i did the update for 1.5. Normaly, the old modules have been disabled...

Tommorow (at work... ^^ )i will check modules, but there's not about price to my mind.

Link to comment
Share on other sites

Hello ! I come back with a real progression : it's the BlockLayered, which makes troubles ! when I disable it, prices are correctly showed.

An I can remark that the panel price (min to max) in the blocklayered are not good...

I hooked the module in the top page. Any ideas ? problem current ?

 

Thank You !

 

 

EDIT : I try to put again the files of this module, reinstall it in the basic configuration with basic hooks, but the problem persist.

 

I try to reindex prices, attributes and url, but price showed is always 0... :/

Edited by Zulian (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I'm seeing a similar issue with 1.5.2. I was only seeing $0.00 inside product-list.tpl, but on homefeatured.tpl, the prices are correct.

 

I managed to get the correct price displayed by editing the product combinations and setting a different combination as the default, and then changing default combination back to original. Now price shows up correctly on product-list.tpl.

 

However, the problem still persists on the products-comparison.tpl template.

 

I have disabled the layered block navigation module, but the problem still persists.

 

The problem also persists whether I use default template or modified template (though modified template files are using the same code).

Edited by pspahn (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Hi! I had the same with PS 1.5.4.1 after adding the combinations of attributes. I have no clue why, but it happens not with all products in the list, strange conflict. I couldn`t determine the problem, but thanks Zulian for the post. Yes, in my case, problem was with BlockLayered too. When i disabled it everything started to be ok, but i still curious how can we fix it to be able to use BlockLayered module.

Link to comment
Share on other sites

Hello,

 

I had the same problem after adding new combinations of existing products.

 

I suggest you go to Product=> Combinations and change the "default" to another combination. You can then change it back to the original one and the problem should be solved.

 

At least it worked for me. 

  • Like 2
  • Haha 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I had the same problem after adding new combinations of existing products.

 

I suggest you go to Product=> Combinations and change the "default" to another combination. You can then change it back to the original one and the problem should be solved.

 

At least it worked for me. 

Thank`s a lot! It works, but i`m still trying to find the "root" of the problem. 

Edited by S@nya (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello ! I come back with a real progression : it's the BlockLayered, which makes troubles ! when I disable it, prices are correctly showed.

An I can remark that the panel price (min to max) in the blocklayered are not good...

I hooked the module in the top page. Any ideas ? problem current ?

 

Thank You !

 

 

EDIT : I try to put again the files of this module, reinstall it in the basic configuration with basic hooks, but the problem persist.

 

I try to reindex prices, attributes and url, but price showed is always 0... :/

 

 

oh my god, thank you - i searched for this problem 1 week long 10 hours a day ...

 

i deaktivated the module layered block and know all Produkts have the correkt price!

 

thanks!!

Link to comment
Share on other sites

  • 1 year later...

Thank`s a lot! It works, but i`m still trying to find the "root" of the problem. 

 

Root of the problem is not one. It can be module Blocklayered, or in older versions product.js or product.tpl as many described. And it depends also on appearance of problem: if price 0,00 is on all products or just some, or if it is on homepage (featured, bestsellers,..), or categorie pages, or both, or on detail product page only.

 

For my problem works idea of Phil_F:

https://www.prestashop.com/forums/topic/207373-price-show-in-product-list-is-0/?p=1565101

 

Problem:

after upgrade PS 1.6.0.13 to PS 1.6.1.1 some (not all) products has price 0,00 on homepage (featured, bestsellers,..) and categorie pages. When sorting by price are products sorted correctly as with real price, not with shown 0,00 value - this value was just bug for viewing.

Problem lies in absence of default attribute combination assigned to product with attributes. In older PS it maybe was not problem. But new PS want to be more precise and strictly needs it.

 

My investigation brought results:

- problem lies in database (DB), but it was (maybe) bug in older flawed php script or in DB structure which is not perfectly abstract (values are repeated on more positions) - but it can be helpfull as it is, somehow, somewhere..

- older DB in PS 1.6.0.x has table 'ps_product_attribute_shop' without column 'id_product' - maybe values were operated and compared in some PHP

- upgrade to PS 1.6.1.x comes with adding of this column and some new definitions of keys (and with other things too but this problem is not depending on it  :)

- in tables 'ps_product' and 'ps_product_shop' is column 'cache_default_attribute' but some products has value '0' (zero) in it. If product has some attributes and in this column '0' it produces this 0,00 problem. Even if attribute has no impact on price - if I remember correctly  :)

- so there are holes in system, and it produces our problem for some eshop. I think - this is not problem for new eshop started on PS 1.6.1.x, just for upgraded one from older version.

 

Solutions for this definition of problem are two:

1. in Administration set default combination of attributes for product with bad price 0,00 in product lists, or change to other combination and then back, as described Phil_F

2. in DB toilsomely compare tables 'ps_product' and 'ps_product_shop' where 'cache_default_attribute' is '0' and try find in tables 'ps_product_attribute' and 'ps_product_attribute_shop' rows with same 'id_product' and change '0'  to corresponding 'id_product_attribute' back in tables 'ps_product' and 'ps_product_shop'.

Or write some script in PHP to make it for you :)

 

Here is one I´ve made:

psfix_set_default_attr.php

Edited by janoo (see edit history)
Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

Janoo's solution worked for me.  I had four products that were showing $0.00 in the price list view and they all had a value greater than 0 in the 'cache_default_attribute' fields in 'ps_product' and 'ps_product_shop'.  After I changed the value in 'cache_default_attribute' to 0 in 'ps_product' and 'ps_product_shop' for the products that do not have attributes, the prices showed up correctly. I had recently upgraded from 1.4x to 1.6.1.4.  Thanks, janoo!

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

Hello,

I have a problem with my website products (500+) on the detailed product page/form as well. It shows a zero price (€0,00) for all my products; new products as well as old products (some up to 4 years old). Changing the default combination on a product to another combination and then change it back to the first one, does not solve the problem in my case. For all my products I have one (and only one) Combination defined (i.e. the default combination by default). It seems I have to find the answer in Janno's second solution:

2. in DB toilsomely compare tables 'ps_product' and 'ps_product_shop' where 'cache_default_attribute' is '0' and try find in tables 'ps_product_attribute' and 'ps_product_attribute_shop' rows with same 'id_product' and change '0'  to corresponding 'id_product_attribute' back in tables 'ps_product' and 'ps_product_shop'.

Or write some script in PHP to make it for you :)

Here is one I´ve made:

psfix_set_default_attr.php

Could somebody help me changing the id_product attribute back in the ps_product and ps_product_shop tables?

How do I do that? What do I have to do exactly (screenshots)

And could someone send me your script behind the psfix_set_default_attr.php link, since that does not work anymore (seems to be expired) 

PS: I have NOT installed/enabled the Layered Block Navigator!

I am on PrestaShop Version: 1.6.1.17

ATTACHMENT: I have enclosed screenshots of my problem: a product with and without a combination

Could someone have a look address my specific issue according knowledge regarding the bigger picture of this "multiple pricing issue" (as outlined by Janoo), and tell me what the problem/solution is in my case???

Thank you in advance

Sales price on productcard error.docx

Sales price on productcard error.docx

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...