Skip to main content

Questions tagged [code]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

Add new column for product table in new orders from back end (ADMIN)

I want to add a column in this table. It is the product table to create a new order from the magento admin panel. This is to be able to know the qty per package while creating orders ourselves. Does ...
johncorbeil's user avatar
0 votes
1 answer
43 views

How to depoy code in magento2 cloud project?

I have following queries as a beginner for the Magento/Adobe Commerce Cloud project. How we can do the deployment process? What is the best practice to do the deployment process? Can we create new ...
Jitendra Patel's user avatar
0 votes
2 answers
60 views

How can I make the button be black and white with round edges?

Banners have the correct button I want, black with white text and rounded edges The buttons added to the page have a burgundy boarder and blue text Can someone help as I cant find this anywhere in ...
user114366's user avatar
0 votes
1 answer
50 views

how to create a customer by using two fields passwords and confirm password in email section on magento2 checkout?

I have two fields created at the email section in checkout in magento2. I want to create a customer on order place. I am currently using "sales_order_payment_save_before" to get field data ...
Magento Inquiry's user avatar
0 votes
0 answers
26 views

Adding additional price to product

I want to add additional prices to a specific product such as courier charges. How do i do that in Magento 2 when I only have Flat Rate, Free Shipping and Table Rate? Without needing a plugin I mean. ...
sarmad95's user avatar
0 votes
2 answers
227 views

Indentation Style (Code style) Magento 2

Hey, I wanna check if there is some documentation about the code style for magento, specially regarding the best practices Indentation style for magento. I will give 2 examples, and I wanna also know ...
Pedro Lima's user avatar
0 votes
1 answer
271 views

Magento 2: Show Image by its Role

I want to create a custom image role and assign it to product. Only those products image will be shown on category page having that custom role.
Magento Inquiry's user avatar
0 votes
2 answers
612 views

How to generate custom log file in magento 2?

I have tried generating custom log file using helper and logger but the file did not generate.
Magento Inquiry's user avatar
0 votes
0 answers
13 views

how to show product quantity in dropdwon on configurable products?

My product quantity is showing in a dropdown but only on simple products. I want to do the same on configurable products.
Magento Inquiry's user avatar
1 vote
1 answer
25 views

I wanto to make the qunatity of products in a dropdown

My qunatity/Qty on Product page i simple a text field. I want to change it into a drop-down.
Magento Inquiry's user avatar
1 vote
2 answers
330 views

how to add cms block in magento without using our own theme and in app/code?

How to Add CMS Block in Magento2 programatically. I want to add a cms block in app/code insstead of app/design using layout or xml files.
Magento Inquiry's user avatar
0 votes
1 answer
52 views

What is the coding standard for extension development for Magento OS and Magento Ecommerce

Extension development coding standard for Magento OS and Magento Commerce?
Prey's user avatar
  • 1
0 votes
0 answers
211 views

Install MFTF Automation testing in Magento Version 2.4

I am trying to install MFTF automation testing in Magento's latest version 2.4. I am following the Magento basic documentation. In the Magento root directory, I run the command vendor/bin/mftf build: ...
Manoj Jarial's user avatar
0 votes
2 answers
21k views

How do I make a pdf link within website open in a new window?

Is there an easy way to set a pdf link (link to a file within the website) open in a new window? I am sure this must be something to do with the code, but it is the first time I have been asked to do ...
G Holden's user avatar
0 votes
0 answers
224 views

in-store delivery method is still not displayed

I have followed all the steps in the guideline URL "https://docs.magento.com/user-guide/shipping/shipping-in-store-delivery.html" but the in-store delivery method is still not displayed in ...
Print Persona's user avatar
0 votes
0 answers
295 views

How to debug that my all error message is not showing in Magento 2?

I have a Magento 2 Store. So i when i try to login with wrong cred. it just doesn't show me error its just reload the page like this. i have switched the theme but there is still the same issue on ...
Prits's user avatar
  • 625
2 votes
0 answers
325 views

Add Product Name to Advanced Pricing Export

I'm attempting to add the "Product Name" attribute export the Advanced Price List in Magento 2.3.4 but I cannot seem to get it to work. I am attempting to modify the AdvancedPricing.php ...
CJNotts's user avatar
  • 412
0 votes
0 answers
34 views

My code is this and there is no space at starting but still i am getting Fatal error what can I do please tell me?

<?php namespace Magento\Framework\View\Element\Template\File; use \Magento\Framework\App\Filesystem\DirectoryList; use \Magento\Framework\Component\ComponentRegistrar; use \Magento\Framework\...
Km Rashi BksljPwtFi's user avatar
0 votes
1 answer
2k views

Short array syntax must be used to define arrays Use ::class notation instead

I had things like that 90 | WARNING | [ ] Use ::class notation instead. 92 | WARNING | [x] Short array syntax must be used to define arrays 94 | WARNING | [ ] Use ::class notation instead. 96 |...
Giga Todadze's user avatar
0 votes
1 answer
39 views

Static Block Incorrect size

I am very much a novice when it comes to magento. I've self taught myself in areas i can. Long story short a web designer who was all the talk and not much of the walk designed a website for our store ...
Mandy McK's user avatar
2 votes
1 answer
437 views

Add a block to programmatically generated widget

I need to generate a widget block with upgradeData.php and assign a block to this widget how can I do this? Folowing is my code for widget generation: Setup/UpgradeData.php public function ...
Prateek's user avatar
  • 308
0 votes
1 answer
690 views

When to use app/code vs app/design

I saw two topics about that but I'm still not sure. I'm discovering Magento 2, I'm a frontend developer and right now, I just want to make my company website's header and footer (html, css) (so a ...
Clément CREUSAT's user avatar
1 vote
0 answers
143 views

Magento2 Mageplaza LayeredNavigation multiselect filter with AND condition [closed]

I am working on a project which uses Mageplaza Layered Navigation. I need to change the behavior of multiselect from OR to AND. As an example, I create attribute color. When I search for red and ...
Atta Ul Mustafa's user avatar
0 votes
1 answer
33 views

Need code of edited things through admin panel

How we can get the code of edited pages through the admin panel?
Akash Killedar's user avatar
5 votes
2 answers
1k views

Argument replacement not working for type object

I am trying to replace an object using Argument Replacement but unfortunately I am unable to do so for type:object. Every time I am getting error: 1 exception(s): Exception #0 (Magento\Framework\...
Narendra Vyas's user avatar
0 votes
1 answer
835 views

URGENT! Magento2 error The website with code default that was requested wasn't found

My website meets a problem. It shows error: "0":"The website with code default that was requested wasn't found. Verify the website and try again.","1":" I've check ...
eric's user avatar
  • 3
0 votes
1 answer
80 views

Custom php code in magento not working / magento block path wrong

i am new to magento & using magento 2 . I have to run a php code in my cms page . When i check the website i can understand that the theme is Alothemes Bencher6 . So what i did is app/design/...
John's user avatar
  • 75
1 vote
1 answer
89 views

Magento 2: How to Improve Code In Magento (PHP)?

I'm new to Magento just, I'm working on an event I call many files through object manager, but I know that's not a good way, I have a chunk of code just need to know how can I improve it. ...
Partab Saifuddin Zakir's user avatar
0 votes
1 answer
238 views

How to do a dry run in root folder? [closed]

Is there way to do a dry run within your root folder to make sure the line of code works
joe willmott's user avatar
0 votes
1 answer
94 views

How to separate backend code in Magento 2?

I have multiple clients that need their stores to behave differently i.e. additional fields for orders, different ways of saving data etc. etc. Is it possible with Magento 2 to write for example a ...
Dagmara's user avatar
0 votes
1 answer
1k views

Magento 2.3.1 How to display source or stock name on product page ? MSI Multii Source Inventory

How to display source or stock name and code on the product page? Where is information about a current stock or source name? Can I use the code from Sourceitem.php on the Product page? public ...
maya5510's user avatar
1 vote
0 answers
125 views

Checkout Page not loading and getting blank page

first, I apologize for not being a programmer and not being able to publicly post the URL in question. The checkout process gets empty in the second process page. I assume Initialization code laods ...
totrmw's user avatar
  • 11
1 vote
2 answers
489 views

Magento2 I want to change "Please specify the zip code." error message on one step checkout Canada post method

Magento2 I want to change "Please specify the zip code." error message on one step checkout Canada post method Thank you,
MehulKanjariya's user avatar
0 votes
3 answers
162 views

Magento 1.9 header ISSUE

Have some strange header.phtml error. Problem is non my index page everything is ok, and on any other page have some weird problem my header and menu change places. code for my current header.phtml ...
Aleksandar Zubic's user avatar
0 votes
1 answer
81 views

I have a problem adding a new shipping method

I'm trying to add a new shipping method, i create the module in the etc directory like Mrsolutions_Domesa.xml, inside is the next code: <?xml version="1.0"?> <config> <modules> &...
Mirquez Rodriguez's user avatar
1 vote
1 answer
68 views

Problem adding Google Analytics Code and Facebook pixel in Magento Community 1.9.3 [closed]

Our site was hacked a while back and ever since we 'brought it back' we are unable to add Google Analytics code or a new Facebook pixel in - System/Configuration/General/Design/HTML Head/Miscellaneous ...
Dave3Rings's user avatar
2 votes
0 answers
47 views

Transfer to other server

I want to transfer to other server my store (new server have plesk panel ). I wrote command in cli bin/magento setup:backup --code --media --db from old server with this method can i take those ...
darkattack's user avatar
0 votes
1 answer
588 views

Magento 2 - Custom theme - Change the background to an image

I know how to change the colour of my background in my custom theme however I was wondering if it were possible to change the background on all pages to an image? I imagine it is similar to changing ...
Greg's user avatar
  • 399
0 votes
1 answer
143 views

Custom theme - Cannot find code to change text [closed]

I've downloaded a custom theme for my Magento 2 site and would like to know where some files are generally located such as the "Save 60% off sale" text or the "find your next Magento 2 theme". I've ...
Greg's user avatar
  • 399
1 vote
0 answers
224 views

How to use code migration toolkit in magento2?

Below is the Github link for Code migration toolkit magento2. https://github.com/magento/code-migration I need to migrate my magento1 modules to magento2 standards. Does this supports it? If it ...
Jafar Pinjar's user avatar
  • 1,949
0 votes
0 answers
938 views

Create QR codes per single product purchased

Hello to the community! I have the necessity to create QR codes per every single product that's purchased. I know that there's a way to link a SKU to a QR code, but what I need to do is a little more ...
Luca D.R.'s user avatar
0 votes
1 answer
915 views

Change Magento2 attribute code Programmatically

In Magento 2, there is a product attribute code with space.(I know, Magento will not allow to create product_attribute_code with space or with Capital letters). Now, I need to change/update that ...
Saravanan DS's user avatar
  • 1,126
1 vote
1 answer
63 views

Alligning The Subtotal Title To The Right - New Order E-mail In Magento 1.9

I am trying to align the subtotal title to the right after I was told to remove the SKU from the new order e-mail, but everything I do in the coding in (app/design/frontend/base/default/template/email/...
Shahrooz's user avatar
0 votes
1 answer
137 views

How to apply coupon code if specific products are available on the cart?

The cart contains two products ex: product1+product2 then only my discount can be applied, otherwise should not allow even individual also. Based on SKU
YKB's user avatar
  • 91
0 votes
1 answer
182 views

How many Facebook Pixel Code can you have in Magento?

How many facebook pixel codes can you have in Magento. I so that our marketing seo's put in Magento admin console in section Miscellaneous Scripts that there is more then one Pixel code e.g. <!-- ...
DaniKR's user avatar
  • 115
0 votes
1 answer
38 views

How to remove discountcode from checkout and transactional emails?

I'm working with magento 1.9.3.4 and I wold like to remove the Discount code (e.g. COUPONCODE1) from showing on the checkout and transnational emails. Is this possible? Is there a controller/model/...
pisbol's user avatar
  • 3
0 votes
1 answer
3k views

Php / Magento 'requires' Fatal Error .... need help interpreting problem

I am trying to install a new theme (not getting a reply from support about this and trying to fix it myself). After SFTP'ing the theme folders to my root folder, I am getting the following error when ...
parker lewis's user avatar
0 votes
2 answers
1k views

update products price with code

i want to increase my products price in magento foreach ($prodCollection as $product) { echo $product->getName() .'<br>'; echo "old: " . $product->getPrice() .'<br>'; $...
majid's user avatar
  • 53
0 votes
1 answer
33 views

How Do I Get Rid Of Code Showing Up After the Paypal Express Button on the Product Page?

How Do I Get Rid Of Code Showing Up After the Paypal Express Button on the Product Page? I've attached an image of the problem. I'm using Magento vers. 1.9.
WaterBottle's user avatar
0 votes
1 answer
56 views

How can I create a discount code which allows the customer to get a specific item free if they spend over £300? [duplicate]

Either by having this item in their basket anyway and subtracting the value from the order or it would be great if the code added the item on to the order for free, without them having to search for ...
Hannah's user avatar
  • 1