Categories
CMS Magento Mastering Development

Magento2 – Translate in js

In my file app/design/frontend/vender/name/Magento_Newsletter/templates/subscribe.phtml I have written… <script> require([ ‘jquery’, ‘underscore’, ‘mage/translate’, ‘domReady!’ ], function($, _) { $(document).ready(function() { var CaptchaCallback = function() { grecaptcha.render(‘RecaptchaField’, { ‘sitekey’: ‘<?= $siteKey ?>’ }); }; window.CaptchaCallback = CaptchaCallback; }); $(document).on(‘submit’, ‘#newsletter-validate-detail’, function(){ var isSubmit = jQuery(this).valid() && grecaptcha.getResponse() != ”; if (!isSubmit) { document.getElementById(‘captcha’).innerHTML= $.mage.__(‘Please click on the […]

Categories
User Help

Why does PowerShell recognize “job” as a command

Within my Powershell session, the word job is recognized as an "invokable action": PS C:\Users\Rene\> job Id Name PSJobTypeName State HasMoreData Location Command — —- ————- —– ———– ——– ——- 1 Job1 BackgroundJob Completed True localhost … 3 Job3 BackgroundJob Completed True localhost … 5 Job5 BackgroundJob Completed True localhost … 7 Job7 BackgroundJob Completed […]

Categories
CMS Magento Mastering Development

Custom checkout value not getting saved in db

Hi am added two new columns in magento quote and sales_order but it is getting null value every time when i placed the order below is my observer and shipping code SaveOrderObserver.php <?php namespace Vendor\Module\Observer; use Magento\Framework\Event\Observer as EventObserver; use Magento\Framework\Event\ObserverInterface; use \Magento\Checkout\Model\Session as CheckoutSession; class SaveOrderObserver implements ObserverInterface { protected $checkoutSession; public function __construct(CheckoutSession […]

Categories
User Help

Why does PowerShell recognize “job” as a command

Within my Powershell session, the word job is recognized as an "invokable action": PS C:\Users\Rene\> job Id Name PSJobTypeName State HasMoreData Location Command — —- ————- —– ———– ——– ——- 1 Job1 BackgroundJob Completed True localhost … 3 Job3 BackgroundJob Completed True localhost … 5 Job5 BackgroundJob Completed True localhost … 7 Job7 BackgroundJob Completed […]

Categories
Mastering Development

Multiple Kafka Streams input binding (leftJoin)

I am trying to leftJoin three streams. There is a users stream, roles stream and clubs stream. Basically I am trying to go through all the users and get their club membership information, I don’t really need their role in the club, it is here just as a connector between the two. Avro specs have […]

Categories
CMS Magento Mastering Development

Adding custom Fields to magento shipping

Hi am trying to add two custom fields on checkout but its not working am getting error while running compile commands Error:- Compilation was started. Service data attributes generation… 2/7 [========>——————-] 28% 50 secs 210.0 MiBPHP Parse error: syntax error, unexpected ‘-‘, expecting ‘(‘ in E:\xampp\htdocs\m2\generated\code\Magento\Checkout\Api\Data\ShippingInformationExtensionInterface.php on line 78 Parse error: syntax error, unexpected ‘-‘, […]

Categories
CMS Magento Mastering Development

CustomerData Messages Section is not showing up

What I am trying to do: Normally you have to click "Update Shopping Cart" button to update cart when you change the quantity. With this following code, you do not need to reload cart but it will automatically reload card when you change item qty using AJAX. define([ ‘jquery’, ‘Magento_Checkout/js/action/get-totals’, ‘Magento_Customer/js/customer-data’, ‘Magento_Ui/js/model/messageList’, // added component […]

Categories
CMS Magento Mastering Development

Magento 2 – How to display messages on ajax success change

What I am trying to do: When I update the cart qty so that the qty is higher than the quantity available, I want my code to be able to show an alert ‘The requested qty is not available’ pop up or notification. Situation now: So I have created a custom module so that the […]

Categories
CMS Magento Mastering Development

Magento 2 – How to make ajax show messages

I want to display messages on the cart page. I have made a custom module so that the shopping cart will automatically reload when the qty changes using AJAX. Here is my js code: define([ ‘jquery’, ‘Magento_Checkout/js/action/get-totals’, ‘Magento_Customer/js/customer-data’, ‘domReady!’ ], function ($, getTotalsAction, customerData) { $(document).on(‘change’, ‘input[name$="[qty]"]’, function(){ var form = $(‘form#form-validate’); $.ajax({ url: form.attr(‘action’), […]

Categories
CMS Magento Mastering Development

Magento 2 – How to display messages on cart?

I want to display messages on the cart page. I have made a custom module so that the shopping cart will automatically reload when the qty changes using AJAX. Here is my js code: define([ ‘jquery’, ‘Magento_Checkout/js/action/get-totals’, ‘Magento_Customer/js/customer-data’, ‘domReady!’ ], function ($, getTotalsAction, customerData) { $(document).on(‘change’, ‘input[name$="[qty]"]’, function(){ var form = $(‘form#form-validate’); $.ajax({ url: form.attr(‘action’), […]