Closed (outdated)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2018 at 11:52 UTC
Updated:
20 Feb 2019 at 13:27 UTC
Jump to comment: Most recent
Comments
Comment #2
bojanz commentedThere is a product_url variable documented in that template, can you try that?
Comment #3
zenimagine commentedThank you, here is my current template (it's my first twig template).
commerce-product--produit--teaser-relation.html.twigI have a problem :
- the
{{ product.product_url }}code displays a link to the current page. The problem is that the products are in one block on another page.How to display the product link (not the page)?
- the title
{{ product.title }}also displays the tags, I only want the text. How to do this ?Comment #4
saurabh.dhariwal commented@zenimagine, I review your issue & I made change like:
<a href="{{product_url}}" title="my-product-title">{{ product.title }}</a>Please try with this, Maybe it resolves your Query.
Thanks!.
Comment #5
bojanz commentedThat's a custom scenario, which means you will need custom code (your own preprocess function that adds a link to the current page that contains the block).
That's a matter of formatter setup. Go to the "Manage display" screen for your product type and reconfigure the title formatter.
Comment #6
bojanz commented