Jump to content

"product_reference" field in mobile version


Recommended Posts

Hi,

 

I have built an eshop using Prestashop 1.5. Every item has a "product reference" which I can see when I am viewing the site from a PC. But when I use a smartphone or a tablet this field disappears.

 

I have checked the code at product.tpl and I can find the product reference in both versions (regular and mobile).

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}> 
  <label>{l s='Reference:'} </label>
  <span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span>
</p>

And the same part from the mobile version

{include file="./product-attributes.tpl"}
			
<div id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}>
<br />
<label>{l s='Reference:'} </label>
<span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span>
<br />
</div>

Probably there is something that I am missing...

 

Thanks in advance for your help.

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

In mobile version try to delete the text

{if isset($groups) OR !$product->reference}style="display: none;"{/if}

If this does not help try to find the css of #product_reference. Maybe there is a line there that says display:none or visibility:hidden for mobile version.

Link to comment
Share on other sites

  • 10 months later...

Removing this code displays the main product reference but not the default attribute reference. If the customer adds to cart without changing the attribute then the order has no attribute listed for the product and we have no way of knowing which attribute they wanted (size, colour, etc.). Any ideas?

Link to comment
Share on other sites

Removing the above code deletes only the style="dislpay:none" option and not the product reference. This was originally not shown because of the !$product->reference option. Try to change the attribute references to something else just to make sure they're there.

 

Removing this code displays the main product reference but not the default attribute reference. If the customer adds to cart without changing the attribute then the order has no attribute listed for the product and we have no way of knowing which attribute they wanted (size, colour, etc.). Any ideas?

Link to comment
Share on other sites

They're definitely there - all working perfectly on the normal shop. Just the mobile version where there's a problem. And if the customer selects an attribute the correct reference is displayed. It's only when the customer initially clicks on a product there is no reference showing, although the default attribute is shown. If they choose to add to cart straight from that page we don't get any attributes showing in the back end, only the main product reference.

 

 

Removing the above code deletes only the style="dislpay:none" option and not the product reference. This was originally not shown because of the !$product->reference option. Try to change the attribute references to something else just to make sure they're there.

Link to comment
Share on other sites

  • 1 year later...

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