Skip to content

magento man

How to ad html tag inside trans directive in magento2

I am trying to add a <span> tag inside a trans directive but, it is not working for me. Below is what I am trying: <h1 class=”section-heading order-number-heading”>{{trans ‘Your Invoice <span class=”number”>#%invoice_id</span> for Order <span class=”number”>#%order_id</span>’ invoice_id=$invoice.increment_id order_id=$order.increment_id}}</h1> The output… Read More »How to ad html tag inside trans directive in magento2

Wishlist item Always Return 3 items

define([ ‘jquery’, ‘uiComponent’, ‘Magento_Customer/js/customer-data’, ‘domReady’ ], function ($, Component, customerData) { ‘use strict’; return Component.extend({ /** @inheritdoc */ initialize: function () { var _this = this; this._super(); this.wishlist = customerData.get(‘wishlist’); console.log(this.wishlist); this.wishlist.subscribe(function(newValue) { _this.decorateItems(); }); _this.decorateItems(); }, decorateItems: function() {… Read More »Wishlist item Always Return 3 items