50cent Posted May 24, 2011 Share Posted May 24, 2011 Hi all,You can specify 'condition' of a product in admin. However this does not show in the front end when viewing a product. I want to display 'condition' below 'reference' on the customer product page.I added the code below: reference}style="display: none;"{/if}>{l s='Reference :'} {$product->reference|escape:'htmlall':'UTF-8'} <!-- condition--> {if $product->condition} {l s='Condition :'} {$product->condition|escape:'htmlall':'UTF-8'}{/if} <!-- warranty--> {if $product->warranty} {l s='Warranty :'} {$product->warranty|escape:'htmlall':'UTF-8'}{/if} However although $product->condition & $product->warranty contain different info in the database they are displaying the same information as the product reference.You can see this here: http://www.happylaptops.co.uk/product.php?id_product=10The database values for condition and warranty are 'Used' and '3 Months' respectively, but as you can see, they all display the same info on the product page.Please help! Link to comment Share on other sites More sharing options...
50cent Posted May 26, 2011 Author Share Posted May 26, 2011 I have been trying to figure this our for hours now, but still haven't found a solution - so still looking for help Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted May 26, 2011 Share Posted May 26, 2011 I saw your post yesterday but was too busy to look into it. I wanted to let you know that I took your exact code and it worked perfect for me. I didn't add the warranty to the database but the Condition showed up and worked correctly (as did the Reference). Not sure this helps you but I wanted you to know that it worked in my demo store. Marty Shue Link to comment Share on other sites More sharing options...
50cent Posted May 26, 2011 Author Share Posted May 26, 2011 Thanks Marty Shue This is a strange one, i've noticed now it works for pretty much all the products on my site e.g. http://www.happylaptops.co.uk/product.php?id_product=16...but specifically not for this product:http://www.happylaptops.co.uk/product.php?id_product=10For this last product above, whichever of the 3 fields 'reference' 'condition' or 'warranty' is at the top, has it's value copied to the 2 fields below. I just don't get it! I can't see any issues in the database either.There must be a logical reason for it.Any ideas?Thanks Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted May 27, 2011 Share Posted May 27, 2011 That is very strange! It doesn't do that on my site. You might try simply deleting that particular product and adding it again. If that doesn't work I don't know what else to do. Marty Shue Link to comment Share on other sites More sharing options...
50cent Posted June 1, 2011 Author Share Posted June 1, 2011 Hi Marty!,I have figured out what is causing the 'condition' do display incorrectly.It happens when a product has 'attributes' set.This product http://www.happylaptops.co.uk/product.php?id_product=10 has a choice of RAM as you can see. This is set in the 'combinations' TAB in prestashop admin.Any products which have combinations set have this problem with the condition & warranty showing incorrect values.I have no idea why this is happening?Do you?Cheers Link to comment Share on other sites More sharing options...
Ruscle Posted June 5, 2011 Share Posted June 5, 2011 could you help me please , where should i place that code?thanks Link to comment Share on other sites More sharing options...
Dave L Posted July 10, 2011 Share Posted July 10, 2011 I am also looking for a solution for this.Did you manage to find one?Thanks Link to comment Share on other sites More sharing options...
50cent Posted July 11, 2011 Author Share Posted July 11, 2011 If you move the 'reference' and 'condition' fields outside of the div they are contained in be default, it works. It's very odd.Try echoing the variables somewhere else on the page and you'll see they are OK.I don't know why this happens.So you can either change where you display the info, or add new code to the product controller or product class ( i can't remember which one off hand) to pass the variables to Smarty with different variable names and it will work. Link to comment Share on other sites More sharing options...
Festival Trade Posted July 12, 2013 Share Posted July 12, 2013 This is in fact a very interesting topic as I do sell new and used items on my store. Unfortunately nothing in this topic actually explains where and how to apply the code A small step by step reference would be great Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now