Questions tagged [variables]

The tag has no usage guidance.

33 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
26 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
1answer
510 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 "...
2
votes
0answers
35 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(...
2
votes
0answers
5k 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\...
1
vote
0answers
24 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 ...
1
vote
0answers
27 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 ...
1
vote
0answers
21 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 ...
1
vote
1answer
256 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 template, ...
1
vote
0answers
23 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
1answer
73 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
1answer
2k 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 ...
1
vote
1answer
523 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
1answer
481 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
0answers
126 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 ...
1
vote
1answer
95 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
0answers
13 views

Do an IF in {{var payment_html | raw}}

I need to do an If Else in the {{var payment_html | raw}} variable. I need something like the normal block and IF the payment is MBWay I need a custom html do place the logo and remove some ...
0
votes
1answer
19 views

Can i import theme variables to custom less file?

I want to add a variable that located in "web/css/source/_theme.less" to my custom less file, that I created specialy for home page. I added my less file in "Magento_CMS/layout/cms_index_index.xml" &...
0
votes
0answers
13 views

Magento 1 - Debug magento backend variables

I added some checkboxes to the contact form. e.g. <input name="katalogcheckbox[]" id="katalog_1" title="Katalog für Insektenschutz bestellen" value="katalog_A" type="checkbox" class="checkbox" /&...
0
votes
0answers
66 views

Magento 2.3 Custom Variables in blocks

I have the next problem, I want to use the Porto Owl carousel in combination with a custom variable for the category_id tag. But it would turn out looking like this: {{block class="Smartwave\...
0
votes
0answers
254 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
0answers
47 views

Magento 2 insert Custom variables in Order Update Email Template {{var custom.customattribute}}

Does anyone know how I can manage to make variable to insert a specific data field from a custom checkout field in the email templates for Order update? I am using the module One Step Checkout for ...
0
votes
1answer
20 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=...
0
votes
1answer
840 views

Add email variable to all transactional emails

Is there any way to add one email variable to all transactional emails? My idea is to create a custom variable, put some code in it and display it in all transactional emails.
0
votes
1answer
89 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
2answers
899 views

Magento 2 system variable for “Order Created at” for email templates

What is the email template system variable for "Order Created at" for Magento ver. 2.2.6? Using the variable name: {{var order.getCreatedAtFormated('long')}} doesn't work for me. This is a variable ...
0
votes
0answers
43 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 ...
0
votes
1answer
474 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 : ...
0
votes
0answers
464 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
1answer
77 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
0answers
61 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/...
0
votes
1answer
48 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")....
0
votes
1answer
463 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
2answers
264 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']; $...