View Single Post
  #1  
Old 02-23-2018, 02:41 AM
 
Soptareanu Alex Soptareanu Alex is offline
 

Member
  
Join Date: Sep 2016
Posts: 24
 

Default Working with Twig File

I make a module that put some new info on products in the cart. But i need my view class to point from my custom skin and overriede the original shopping_cart/parts/item.info.twig .

This is the original shopping_cart/parts/item.info.twig :
{##
# Shopping cart item : info
#
# @ListChild (list="cart.item", weight="30")
#}

<td class="item-info">
{{ widget_list('cart.item.info', item=this.item) }}
</td>

And this is my custom skin
{##
# Shopping cart item : info
#
# @ListChild (list="cart.item", weight="30")
#}

<td class="item-info">
{{ widget_list('cart.item.info', item=this.item) }}
{% if this.getDataLivrare() is not null %}
<span> Produsul poate fi livrat cel mai devreme la data de <b> {{ this.getDataLivrare() }} </b> </span>
{% endif %}
</td>

The final result must show like in the picture. What should i change in my view class in order to render data from my custom twig ?
Attached Thumbnails
Click image for larger version

Name:	Shoping_Cart.PNG
Views:	441
Size:	62.4 KB
ID:	5105  
__________________
alex
Reply With Quote