Questions tagged [variables]

The tag has no usage guidance.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
151 views

How to use product name variable in product description - Magento 2.3.5

I would like to create one product description that I can copy and paste into multiple products. Is there a way to pull the product name and other product attributes with a custom variable into the ...
  • 36
2 votes
0 answers
116 views

Adding Predefined Variables to New Email Template?

I am creating a new email template and am trying to attach predefined variables (specifically Order Id) to the new template. I would like the option of clicking on the "Insert Variable" button and ...
  • 21
2 votes
0 answers
55 views

magento 2 I want to write the dynamic {{var shipping_company}} into the xml file

Helllo, i want to set the the dynamic value of variable into xml file try { $om = \Magento\Framework\App\ObjectManager::getInstance(); $filesystem = $om->get('Magento\Framework\...
2 votes
1 answer
756 views

is there a way to add custom variables to product description (using the editor) in magento 2?

I am using magento 2.2.2 and I want to add custom variables to the products description. for now, I can do that with the pages but not for the products (in the page editor there's a button called "...
  • 21
2 votes
0 answers
38 views

Passing variable into head.phtml

I want to generate dynamic meta title categories, based on category level. In view.phtml category this is my code: <?php $category = Mage::getSingleton('catalog/layer')->getCurrentCategory(...
  • 21
2 votes
0 answers
6k views

How to Use Custom Variable in Email Template?

I'm following below post & able to send email. how to send custom email no template in magento2? I have created 1 custom variable named Custome Footer. app\code\Custom\Module\view\frontend\...
  • 9,731
1 vote
0 answers
94 views

List of custom variables that can be accessed inside a static block

What I want to do is inject variables into static blocks. I know this can be achieved in System -> Custom Variables but it wouldn't be any quicker than opening up every static block to change the ...
  • 182
1 vote
1 answer
328 views

Magento 2: How to include auto-generated coupon code in Newsletter Subscribe email template

I want to include auto-generated coupon code that expires in 1 usage in newsletter subscribe email template. Any help will be appreciated.
  • 330
1 vote
0 answers
127 views

Magento 2: Credit Memo refund amount in transactional email

So, I have a custom email setup for credit memo and I am using {{var creditmemo.grand_total}} variable to display refunded amount in my transactional email. Everything is fine except I want to show ...
1 vote
0 answers
56 views

Magento 2 common css variables not applied for third party modules

I am using a custom theme, declared common variables under, app\design\frontend\Zero\my_theme\web\css\source\components 1) _variables.less Eg: @h1__font-size: 48px !important; 2) common.less Eg: h1 { ...
  • 145
1 vote
0 answers
34 views

M2 - Variables empty in CMS Pages

No matter if System Variable or from the STORES > CONFIGURATION > Store Information fields, I can not output variables in cms pages. It feels like I'm missing something so basic, that I can not even ...
  • 21
1 vote
1 answer
607 views

M 2.3.1: Imprint variables are not showing up in E-Mail templates

I have the following problem. I have populated the bank and imprint data as per Configuration -> General -> Imprint for all my store views under Magento 2.3.1 Now I am populating my e-mail ...
  • 67
1 vote
0 answers
131 views

Email templates - variables names get translated instead of showing the value

I'm using magento 2.2.6. My email templates are displaying the translation of the variable used and not their value. I have installed a translation pack for Romanian.
1 vote
1 answer
189 views

How to remove first few digits from order id using order id variable in email template

I am using a 3rd party plugin for order number customization and the format I am using is- {order id}-{counter}AB e.g. 1234-30000AB In the email template when I include order id variable it ...
1 vote
1 answer
3k views

Sending variable to a bootstrap modal

I have seen this asked before but a lot of the answers I found where people looking to get a variable into a modal to query a database. However thats not what I want. I just want to send a variable ...
  • 705
1 vote
1 answer
568 views

Display Polls with a custom template shows only empty results

Meta Magento 1.9.2.1 Custom Template Poll works fine when in sidebar Poll works fine when loaded by layout xml History Based on this information: http://inchoo.net/magento/magento-frontend/...
1 vote
1 answer
677 views

Magento 1.9 sendTransactional doesn't show value from {{var payment_html}}

I'm using sendTransactional() to send emails programmatically. All working fine beside the variable {{var payment_html}} is empty. How to pass this value? below is the code I'm using now. private ...
1 vote
0 answers
160 views

Magento 2: How to get JSON API Variable in Model

Below is the REST API called on Checkout Page, when you have multiple address & u click on "Ship here" magento/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id It passes ...
  • 9,731
1 vote
1 answer
96 views

Email customer when price changes on the product

At the moment I have managed to create a form that will insert product_ID, customer_Email and customer_Price to a table I created in The database. the customer inputs there email and desired price. ...
0 votes
0 answers
9 views

Custom entity wysiwig doesn't replace variable

Field <field name="description"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"&...
  • 1,024
0 votes
1 answer
88 views

How to get the Order Id, Name and Email variables for a Shopper Approved survey?

Magento 2.4.2-p1 Smartwave Porto theme extensions from Amasty subscribed to a Review service from Shopper Approved We have been subscribed to the service from Shopper Approved for a long time. This ...
  • 256
0 votes
1 answer
77 views

Migrated Magento 1 Customer address does not show (shows variables as output instead)

First off, I have searched for a solution here, and on Github, this has never been answered specifically from what I can see, none of the answered items work. Migrated Magento 1 address information ...
0 votes
1 answer
126 views

Convert Magento 1 (migrated) email templates to Magento 2 (variables)

Migrated Magento 1 into Magento 2 does not seem to contain any 'default' Magento 2 email templates (using the Magento 2 migration tool). It only contains the Magento 1 email templates that were ...
0 votes
1 answer
30 views

Other Method for call a custom customer attribute

I am doing an internship in a company, and my internship supervisor wants me to display customer data. More precisely, on the back office in the customer information there is a custom attribute that I ...
0 votes
1 answer
223 views

Magento 2 Notice: Undefined variable: images

I use custom variable in Mirasvit Extension for export parent images also from variants. For test I export single product and working correct. Now I set filter with export all configurable products in ...
  • 2,146
0 votes
1 answer
116 views

How to input these variables in a magento 2.3.4 mail template

We would like to display these variables in a new email template (which is currently assigned to a orderstate): Ordernumber, Customername, Order Status & Invoicenumber. The following code does not ...
0 votes
0 answers
323 views

Magento2 Back End is working fine but front end is not working and showing This page isn’t working error

I am working on a Magento 2 project, and it was working fine until today, but now when I try to open it, the page is not working. The following error is coming in error log: PHP Fatal error: ...
0 votes
1 answer
29 views

get querystring variables to display on static page

How to get querystring information and display on a landingpage? This is a link created on another website with variables to pass to magento2.3.1 website. www.mymagentowebsite.com/staticpage.html?w=...
  • 142
0 votes
1 answer
350 views

How to convert template variables to custom data in magento 2

I have configured a back-end screen where I will enter a string as {{price}} for guest user. click here {{sign_up}}. So after I fetch the field value I want to dynamically replace the {{price}} ...
0 votes
0 answers
80 views

Customising email variables

Is it possible to customer email variables? For example, there is a variable for Shipping description: {{var order.getShippingDescription()}} In the email I want to change new lines (\n) to be line ...
  • 2,519
0 votes
1 answer
634 views

Magento2 : third party js file including issue

I am using three.js (source code) in a module page: requirejs-config.js var config = { map: { "*": { three: "Vendor_Module/js/three/build/three", and in the phtml file : ...
  • 1,655
0 votes
0 answers
518 views

create custom variable for custom module in magento 2

Is it impossible to create a custom variable, such as {{var customer.getName()}} in a custom module and use it?
0 votes
1 answer
79 views

Empty getAddToCompareUrl only in guest mode

I have this variable $_compareUrl=$this->getAddToCompareUrl($_product) to get compare url but this is empty in guest mode, only when i signed in magento it's not empty. I recently migrate from ...
0 votes
0 answers
69 views

Can I store a custom variable in a quote? (temporarily) M1.9.2.4

In Magento, can I store a custom variable in a quote? (temporarily) We use an observer for quote item ... but I need to store a variable in the qupte to use later .... this cannot be used sales/...
  • 5,342
0 votes
1 answer
88 views

Javascript - Read script js only if radio is checked

i'm stuck in a problem with a script js. This is the condition: var stampProd = "?php $stampProd = '10001'; ?"; function valiAnswPos(){ if (document.getElementById("positive")....
  • 487
0 votes
1 answer
483 views

Discount label and code variable

I am trying to create custom variable in Magento, but how do I get the discount label for the code used and variable for discount description. I have found the following code, but am not sure how to ...
0 votes
2 answers
355 views

I have send custom mail and set the custom variable but. When I access the variable in transaction mail template then it will not work

This is my email sending code if (isset($_POST['send'])) { $templateId = 9; $sendername = 'Call To Order'; $senderemail = $_POST['email']; $sendermobile = $_POST['mobile']; $...