Questions tagged [frontend]

Denotes questions related to frontend development, configuration and management

Filter by
Sorted by
Tagged with
31
votes
14answers
79k views

magento 2 admin url not working and loaded frontend is all messy

Admin url is showing 404 error after installing magento 2 on wamp server and frontend design is all messy and css is not linked to it.Error visuals are shown below. Frontend error:
52
votes
2answers
26k views

Magento 2 - How to add a custom field to checkout and then send it

All tutorials are covering only adding a fields, but saving value of this fileds is skipped #mindblown. I don't know why, it's most important part of adding any field or form. I tried to follow ...
28
votes
7answers
22k views

Clear Theme/CSS Cache in Magento 2

When I am theming a Magento 2 store, what is the suggested way to clean the caches? I edit the .less files and then I currently do rm -rf pub/static/frontend/* var/view_preprocessed/ var/*cache/* ...
23
votes
4answers
8k views

Live site blank in frontend or keep on loading and never load

I am facing Strangest Problem ever in magento. we are using 1.9.0 version. from last 2 months, our live site is "blank" or "keep on loading" for used browsers. Means in this browser we visited the ...
14
votes
5answers
46k views

SSL secure entire Frontend (all pages)

I run a store selling digital products and for me it is very important to show customers that my ENTIRE store is safe. Also Google have started to reward sites ussing SSL. http://...
6
votes
3answers
13k views

Magento 2.2 How to show out of stock in configurable product

this may be a simple question for some - but we havent used stock extensions before. Question: how can we easily, simply, add the ability to - instead of hiding out of stock simple products (as part ...
4
votes
10answers
21k views

Magento 2 shows 404 error and front end css crashed

I have installed Magento 2 successfully. When i am trying to open front end that looks like this picture and backend shows 404 error. how to solve this?
7
votes
2answers
12k views

Double frontend cookies causing intermittent login issues

The site runs Magento CE 1.7.0.2. Customers have been reporting issues with logging in. I've been able to replicate this myself on Safari only (do not know the exact steps to replicate yet though). ...
14
votes
5answers
36k views

Magento2: Best practice to modify css files

I want to modify css file pub/static/frontend/Magento/luma/en_US/css/styles-l.css. Initially this file is not present in pub/static folder and it's present in vendor/magento/theme-frontend-blank/web/...
15
votes
2answers
4k views

Autologin on frontend from the backend

See the following scenario. I have some custom module that allows the frontend user to perform some actions on some custom entities. (details are not really important). The request is that an admin ...
5
votes
8answers
15k views

How to check that customer is logged in on frontend in Magento 2.1?

How to check that customer is logged in? In authentication-popup.js I found following code: define([..., 'Magento_Customer/js/customer-data',...], function(..., customerData, ...) { ...
2
votes
3answers
2k views

Magento2 how to remove “choose an option” in configurable products drop down

How to remove "choose an option" in configurable products drop down and in the drop-down menu have the first attribute value be the top choice please if anyone idea reply me I need this type of
6
votes
1answer
3k views

Magento 2 Plugin implementation for js frontend?

A plugin as far as I read is created for intercepting a PHP function call and running code before, after, or around that function call. Is there a way how to accomplish that in js file? How can i ...
17
votes
6answers
20k views

How to get current customer group id in magento2

I want to get current customer group id in phtml file. When I am not logged in still it is return general type customer group. How can get proper output?
12
votes
1answer
11k views

Magento 2 : How to get Final price & Original price of all types of product

How can I get Original price and Final price of given below types product? Simple product Configurable product Bundle product Group product For simple product I can get price easily using below code....
14
votes
4answers
18k views

Magento 2 - Override base view file

I'm currently developing a Magento 2.0 theme. I'm trying to change the behaviour of the Tax class on the frontend. The file I need to change is located in app/Code/Magento/Tax/view/base/templates/...
11
votes
3answers
2k views

Magento 2 add new theme without changing core files. Grunt

How to extend default Magento 2 Grunt configuration without touching/editing core files like Gruntfile.js and dev/tools/grunt/configs/themes.js?
5
votes
4answers
12k views

Magento 2 Open minicart when item is added

I have a relatively stock minicart implementation, and I wanted to know if there is a configuration option or some other way of setting up the mini cart to drop down (open) when an item is ...
4
votes
2answers
5k views

Magento 2 How to check if Admin Logged on frontend

I'm trying to check if admin is logged in on frontend in Magento 2 but I didn't find the way. Some help?
3
votes
3answers
5k views

How to add custom phtml in catalog view page in magento2

I want to add some custom code in my catalog category view page. I don't want to override product/list.phml file . But just display my custom code in catagory view page. How to add it?
2
votes
2answers
1k views

Copied to Local WAMP server, Exception: SQLSTATE[HY000] [1045] Access denied for user

So I had a website up at http://www.avantalarm.com/ and after many issues trying to add modules, I decided I'd export it to a local WAMP server to work on my development so I didn't break the site ...
2
votes
1answer
1k views

Magento 2: how to hide ''price' of custom option in configurable product

Using Magento 2, Front, Configuration Product. I need to hide price from custom option of configuration product. Front -> Product Option
2
votes
2answers
9k views

Cannot display image inserted by WYSIWYG editor

I created a form on backend and inserted an image into the editor. The image displays properly in the editor. However, the image cannot be displayed on frontend and 404 error is shown on the console. ...
0
votes
2answers
106 views

In Jquery, How to capture the data within <span>product_price</span> in the event of a change in the product price?

Below is the code written to capture the updated price from within <span class="price">Price</span> as the price changes on one choosing a variant of a product from the drop-down. I find ...
0
votes
1answer
322 views

How to Disable province , zipcode and country from checkout. Magento 2.2

In Magento2 - I want to remove ZipCode , Province and Country name from the Checkout page for which I tried Vender/Module/view/frontend/requirejs-config.js var config = { config: { ...
33
votes
2answers
19k views

In Magento2 what is <script type=“text/x-magento-init”>?

I am new to Magento2 and our organisation has just get the EE licence. I have installed it on my local machine and the default template spits out the following mixed in with HMTL: <script type="...
6
votes
1answer
11k views

Magento 2: Override/extend the email.css that is being used in the transactional email header

When adding a new email header template i see the following bit of code: <style type="text/css"> {{var template_styles|raw}} {{css file="css/email.css"}} </style> ...
15
votes
1answer
8k views

Best way to extend module less found in web/css/source/module, like _minicart.less?

Which is then the best way to extend less files content in <module>/web/css/source/module/, like for instance Magento_Checkout/web/css/source/module/_minicart.less? Assuming that to A) ...
4
votes
2answers
2k views

Magento2 RequireJS CustomerData is empty at page load, but populated once page finishes loading?

I'm trying to access some data stored in the Magento_Customer/js/customer-data object I have the following files: --- garage.js --- define([ 'Magento_Customer/js/customer-data' ], function(...
15
votes
2answers
15k views

how to sort categories as they are shown in admin?

Here is the code: $category = Mage::getModel('catalog/category')->load(3); $subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren(); $subCatIds = explode(',',...
9
votes
3answers
8k views

How to overwrite a template via module in Magento2

I am creating a module and want to overwrite the template app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml. Is this possible in a module (not a theme) ...
8
votes
3answers
6k views

How to get product's frontend url from backend?

I am developing a extension of Magento 2. I need to get a product's frontend url from backend. I have tried to use: //$storeManager->->setCurrentStore(2); $url = $product->setStoreId(2)->...
6
votes
2answers
5k views

How can I add custom less file and in a particular theme compile less file in Magento 2

How can I add custom less file and in a particular theme compile less file in Magento 2 ?
3
votes
4answers
8k views

Configurable Product options box not showing on the front end

The drop down selection box is not showing for configurable products, the configurable product itself is showing but not the options to choose which simple product is selected. It is probably notable ...
10
votes
6answers
2k views

Magento 2 - Overriding CSS without using !important everywhere

I'm working on a Magento 2 site at the moment for a client. Suppose my client's brand is boofar and the theme I'm trying to extend/override is foobar I've set as the parent theme using frontend/...
9
votes
2answers
4k views

Magento 2 Full Page Cache not working

Whenver I turn on FPC(Full Page Cache) feature in my Magento CE 2.0.2 site (doesn't matter if default theme or custom theme is running.) and when I open the Homepage of this site, then it gives "...
7
votes
3answers
7k views

Magento 2 CE: Front controller reached 100 router match iterations Issue

I'm using Magento 2 CE Version 2.1.0 Taking reference of http://inchoo.net/magento-2/routing-in-magento-2/ for Routing. My Router.php Controller Code public function match(\Magento\Framework\App\...
6
votes
6answers
17k views

Magento 2: How to get category image?

I want to display the category image of the category.I have a phtml file and is called in cms home page. <?php $subcats = array(99,189); $imageBlock = $block->getLayout()->createBlock('...
5
votes
2answers
1k views

How do I make certain frontend pages accessible only by admin?

How do I make certain frontend pages accessible only by admin? I have tried using Mage::getSingleton('core/session') and Mage::getSingleton('admin/session') to no good end. Any suggestions? Oh, and ...
4
votes
1answer
8k views

Favicon going back to default when opening a new window

I have changed my store favicon and it works perfectly when navigating through my store. However when i open a datasheet from my products a new window opens up displaying the PDF file, however my ...
3
votes
4answers
13k views

Magento Reset Password Link not working after upgrade

My client had upgraded magento version in his site recently. But after upgrade whenever the customers try to reset their passwords they get link in their email, and when they click on the link they ...
3
votes
3answers
2k views

Enable certain users to add products to my store

I'd like to allow some users to sell products in my store, without giving them access to magento's back end. Is there any extension for doing that ?
1
vote
4answers
4k views

How to assign a theme in Magento 2 using a setup script?

How can we assign a theme in Magento 2.1 to a store using setup scripts? Thank you
1
vote
1answer
790 views

Custom css for custom block/phtml.

Where should I put the custom .css file for my custom block/phtml. When I want to customize the display of my block then I have to create a custom .css for that. But where do I have to put that .css ...
3
votes
2answers
6k views

Inline translation tool is not working and i can't enable it

Can't use inline translation tool in front end of my webpage. Its working fine in backend. I checked on the frontend if System>Config>Advanced>Developer>Translate Inline>"Enabled for Frontend" is ...
2
votes
1answer
2k views

Show description of product in wish list phtml file

I want to get description of product in wishlist Page, I tried this code In list.phtml file but no luck . <?php echo $_product->getDescription() ?> EDIT my code now look like this <?...
1
vote
1answer
1k views

getChildHtml(' ', true, true) - Magento 1.9

What does it mean these: 1. <?php echo $this->getChildHtml('child.name') ?> // get the child parent block 2. <?php echo $this->getChildHtml('') ?> //? 3. <?php echo $this->...
1
vote
3answers
2k views

Magento 2: Adding JS from module

I have a module, and I want to add a javascript generated in the module at the frontend footer. The javascript has to be built dynamically because it depends on server variables. I've thought of a ...
1
vote
1answer
510 views

Create a new package based on “default” package’s “default” theme

I'm studying to get Magento FE certification and I've found some demo questions like this: You want to create a new “screendesign” package based on the “default” package’s “default” theme. Which ...
-1
votes
3answers
244 views

Front and backend not loading properly [closed]

When I am opening my admin panel, the pages are not loading properly.please help me to resolve this error as soon as possible