Skip to content

magento man

How to use external js for the phtml files in magento 2

my phtml file <div class=”home-del-days-main-cont”> <div class=”hof-changeoutletcontent”> <div class=”h-find-de-day”> <h2><?php echo __(“Enter your postcode to find delivery days “);?></h2> <div> <p style=”text-align: center;”><?php // echo __(“Please enter a delivery postcode to see delivery days.”);?></p> </div> </div> </div> <div> <div class=”h-news-frm”>… Read More »How to use external js for the phtml files in magento 2

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