Questions tagged [code]
The code tag has no usage guidance.
133
questions
1
vote
0
answers
122
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 ...
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 ...
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 ...
1
vote
1
answer
57
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/...
1
vote
0
answers
67
views
Area Code not set when Model is used while using Upgrade Data Script
I have following code in UpgradeData.php
protected $test;
public function __construct(
\Vendor\ModuleName\Model\Test $test
)
{
$this->test = $test;
}
public function ...
1
vote
0
answers
58
views
Magento 2 : Is there a file system map for Magento 2?
Ultimately I want to add code snippets to some or all pages on my website, specifically, the code is the Facebook pixel code is the google tag manager code.
I've found a number of similar questions ...
1
vote
1
answer
182
views
How to decrease brand product list page load time in magento?
I am collecting brand specific products based on the brandId in brandproductlist.php as follows.,
$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('*')...
1
vote
1
answer
629
views
Magento Coupon Codes Not showing up in Report
I have set up various coupon codes in Magento, all work ok. However not all of them show up in the 'Coupon Usage Reports' page. They have all been made exactly the same way. Why is this?
1
vote
1
answer
311
views
Custom Cart Cross-Sell Item
I am trying to add a cross-sell product to a custom cart page. The regular process for adding cross-sell products to products in the admin panel does now show up in our cart. Is there a file/ line of ...
1
vote
5
answers
1k
views
programatically created bundled product : option and product do not show on frontend unless saved from admin [closed]
i have programmatically created bundled product and also able to add selection and option data to it, but my problem is that product is not visible in front end. when i save that product even without ...
0
votes
2
answers
17k
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 ...
0
votes
2
answers
94
views
What does this code do in magento?
What does this code do in magento ?
$customer = $this->_getCustomer();
this code in createPostAction in customer/accountController .
Why put underscore "_" in most of Method
0
votes
2
answers
128
views
html / code to add price in a specific block?
I've tried multiple snippets of code to add an item price to a specific block without success.
On the example item page : https://fixlcdscreens.com/default/catalog/product/view/id/10234/s/ACER-...
0
votes
1
answer
575
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 ...
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.
<!-- ...
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>';
$...
0
votes
2
answers
443
views
how to check which collection is taking how much time to load in a function in magento 1.9
I am writing a backend function for loading a profile on android app, want to figure out why its slow , and taking more time to load so want to debug the load time of each query in function how can I ?...
0
votes
1
answer
2k
views
Notice: Undefined index: files in app/code/core/Mage/Core/Model/Translate.php on line 1
Notice: Undefined index: files in /home//public_html/.com/app/code/core/Mage/Core/Model/Translate.php on line 139
#0 /home//public_html/.com/app/code/core/Mage/Core/Model/Translate.php(139): ...
0
votes
1
answer
55
views
Customization through Coding in Magento 2 [duplicate]
I am new to magento & I don't know anything about magento 1.x. I am working on magento 2. Can anyone suggest me some resources where can I find the links for Coding in magento?
I have already ...
0
votes
1
answer
49
views
Inserted code in footer and product dissappere
I have a problem with some code deleting itself.
I have inserted an image in the footer, just below the newsletter subscribe button, and a code showing the stock lvl on the product pages.
But after a ...
0
votes
1
answer
441
views
magento recursive function not working
i created recursive function in magento which give string out at last .
i had created custom customer attributes, every time a new customer is registered he is registered using attributes from its ...
0
votes
2
answers
524
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.
0
votes
1
answer
51
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?
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 |...
0
votes
1
answer
618
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 ...
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/...
0
votes
1
answer
232
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
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 ...
0
votes
1
answer
136
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
0
votes
1
answer
665
views
Magento 2 | How can we use jQuery without "require(['jquery'],function($){" this code
We have face problem we implement some slider and also we have wrighten many script in phtml.
If we add the jquery library then magento is giving the error in core files and all script are stopped ...
0
votes
1
answer
1k
views
Countdown Timer
I can't get the following code to work on the frontend. It displays correctly but will not countdown as I would like. I have tried changing the date but nothing happens. Could someone point me in the ...
0
votes
1
answer
213
views
Why it's showing Undefined index when I try to convert a module from M1 to M2?
I'm trying to convert one module to M2, and after running the code_conversion_tool, I've ended up with .converted files all around.
I've renamed them to replace the actual files.
While doing setup:...
0
votes
1
answer
35
views
Community ed: sell some products, leave other products as "enquire now"
I am not very experienced in Magento. A client currently has all their products with an "enquire now" button, instead of "add to cart", which opens a model window with a form requesting their contact ...
0
votes
1
answer
1k
views
How do I remove the "Delete" mass action from an observer
I want to remove the "Delete" mass action from the Products grid. I am trying to do this from my observer. Here is my observer class
class NameSpace_Module_Model_Observer {
public function ...
0
votes
1
answer
839
views
find all files/directories belonging to a specified module
Is there a standard method or has anyone found a way to somehow parse the directories of a magento install with a script of some sort to find all files and directories belonging to a module?
I'm ...
0
votes
1
answer
960
views
Login Button Not Working
I'm not sure what I did here, but I've killed my Login button when I reworked the login.phtml file. Here is the original code, which works, followed by the reworked code, which everything works on ...
0
votes
1
answer
104
views
CMS Pages display differently
I just took over a site from another programmer and I am trying to figure out what he has done. I have multiple CMS pages to include the home page. The homepage displays correctly, but several of ...
0
votes
1
answer
275
views
Wrong code in one step checkout
Does anybody know how to remove the unnecessary code on the checkout screen?(marked in yellow on the picture).
The code for this block is:
Hope somebody could help me, thanks!
0
votes
1
answer
907
views
related products by brand, coding
I want to display in the related products items from the same brand in order from the latest added. I was looking for an extension that can do it and didn't find it. So I figured out that the solution ...
0
votes
1
answer
36
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 ...
0
votes
2
answers
37
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 ...
0
votes
1
answer
48
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 ...
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.
...
0
votes
0
answers
40
views
Unable to add tracking #
Is there anyone available for the help please. I was trying to add tracking # into the order but I'm giving an error.
Complete process is here: https://drive.google.com/file/d/...
0
votes
2
answers
178
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 ...
0
votes
1
answer
266
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.
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.
0
votes
0
answers
199
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: ...
0
votes
0
answers
206
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 ...
0
votes
0
answers
270
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 ...