Jump to content

How to remove condition in the product file?


Recommended Posts

We are trying to remove condition on the product page. But would like to know if we are right.

 

In the product.tpl in the theme>themes name folder. Do we remove is code?

 

{if !$product->is_virtual && $product->condition}
<p id="product_condition">
<label>{l s='Condition:'} </label>
{if $product->condition == 'new'}
<link itemprop="itemCondition" href="https://schema.org/NewCondition"/>
<span class="editable">{l s='New product'}</span>
{elseif $product->condition == 'used'}
<link itemprop="itemCondition" href="https://schema.org/UsedCondition"/>
<span class="editable">{l s='Used'}</span>
{elseif $product->condition == 'refurbished'}
<link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/>
<span class="editable">{l s='Refurbished'}</span>
{/if}
</p>
 
Natebc
Link to comment
Share on other sites

 

These conditions are related to virtual products.

And they are important if you have virtual products.

Some of Virtual product conditions :

  • Download limit
  • Download expiration date 
  • etc.

 

 

 

Hi ndiaga,

 

Were can we delete/remove the condition on the product page?

 

Untitled.png

Link to comment
Share on other sites

 

 

Thanks Ndiaga, for the links.

 

We just send the last 4 hours trying to find that line of code and still not able to find it.

 

All we have ford in the product.tpl file in (themes/themename/directory) is:

 

"{if !$product->is_virtual && $product->condition}

<p id="product_condition">
<label>{l s='Condition:'} </label>
{if $product->condition == 'new'}
<link itemprop="itemCondition" href="https://schema.org/NewCondition"/>
<span class="editable">{l s='New product'}</span>
{elseif $product->condition == 'used'}
<link itemprop="itemCondition" href="https://schema.org/UsedCondition"/>
<span class="editable">{l s='Used'}</span>
{elseif $product->condition == 'refurbished'}
<link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/>
<span class="editable">{l s='Refurbished'}</span>

{/if}"

 

and

 

{if !$product->is_virtual && $product->condition}
<p id="product_condition">
<label>{l s='Condition:'} </label>
{if $product->condition == 'new'}
<link itemprop="itemCondition" href="https://schema.org/NewCondition"/>
<span class="editable">{l s='New'}</span>
{elseif $product->condition == 'used'}
<link itemprop="itemCondition" href="https://schema.org/UsedCondition"/>
<span class="editable">{l s='Used'}</span>
{elseif $product->condition == 'refurbished'}
<link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/>
<span class="editable">{l s='Refurbished'}</span>
{/if}
 
That looks the same . We cant find this line of code it the file:
 
  1. Comment out/remove the following code:?

1
2
3
4
<p id="product_condition"{if !$product->condition} style="display: none;"{/if}>
<label>{l s='Condition'} </label>
<span class="editable" itemprop="condition">{$smarty.capture.condition}</span>
</p>

Commented out code will look as follows:

1
2
3
4
<!--<p id="product_condition"{if !$product->condition} style="display: none;"{/if}>
<label>{l s='Condition'} </label>
<span class="editable" itemprop="condition">{$smarty.capture.condition}</span>
</p>-->
Natebc
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...