Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [conditional-loading]

The tag has no usage guidance.

0
votes
0answers
10 views

Magento 1.9.3.1 - Coupon - set condition calculate cart total on non sale items?

I've a client with a request for a coupon that seems to have hit a restriction in what magento 1.9.3.1 can actually do. We have products that are normal price and 'special price'/sale items. The ...
0
votes
1answer
661 views

Magento2 admin grid ui component form hide multiple fields based on php condition

I have so many fields in my admin grid form which made using UI component. I want to hide some of the fields using php condition. I know that it can done using DataProvider file and I also followed ...
0
votes
1answer
2k views

Images and products are not loading

My website is on Magento 2.1.11 version I uploaded all the products and setting up everything but after that, I noticed that my website images (Banner as well as products) not loading in the first ...
0
votes
1answer
131 views

Conditionally enable event observers in Magento 1.9

I am using multiple event observers in Magento 1.9 From there, I want to conditionally execute other observers. For example, defining the configuration in system.xml to enable or disable execution ...
0
votes
2answers
624 views

Magento 2 change logic in layout if logged in

I have a block in a layout xml but I only want it to be displayed if the customer is not logged in. Is this possible?
1
vote
2answers
707 views

how do I call function(Helper) from xml in magento

i see this post I want to do the same but with a condition. I want to call an helper function which return a boolean. And in my xml do like : <?xml version="1.0" encoding="UTF-8"?> <...
4
votes
1answer
530 views

How to load my javascript file before other javascript file from addJs

I am facing some javascript issues by loading order of custom module Javascript files, so i want to change the loading order of my Javascript files located at magento root root/js/. But the ...
2
votes
1answer
1k views

How to display best seller products category wise?

I'm using MageBees bestseller products extension. And want to customize it in order to get best selling products category wise. Like For Category A, Best Seller Products For Category B, Best ...
1
vote
1answer
389 views

Magento 2 - Conditional Static Block

Is there any way for you to conditionally display a static block? For example, I want a block on the homepage that will only display if there is content in the block. If it is empty, the block ...
2
votes
1answer
2k views

Magento2 check in template if page is homepage

How would I check directly in a .phtml template if the requested page is homepage? I would like to add conditionally a class to a given container
7
votes
3answers
14k views

How to load a phtml file only for homepage? (Magento 2)

I am trying to load a phtml file like this: File /app/design/frontend/name/themename/Magento_Theme/layout/default.xml <referenceContainer name="page.top"> <block class="Magento\...
1
vote
1answer
156 views

Load the cms content based on theme in cms editor

I have two different themes one for desktop and one for mobile. I added about-us page content in cms pages. Its working fine in desktop. Now, the html is different for mobile theme. So, how can I ...
7
votes
1answer
1k views

Magento 1.9.1 - Shopping cart price rules - Condition subselection issue

After upgrade from Magento 1.8.1 to 1.9.1 I got not working add to cart button for configurable products, fatal error: Fatal error: Maximum function nesting level of '1000' reached, aborting! in /...
3
votes
1answer
312 views

Magento hide flat rate on orders over x.xx

I have set a Flat rate shipping of R100.00 (South African Rands) for all items less than R500.00. At the moment it is working. It loads if the orders are less than R500. However the moment the order ...
1
vote
1answer
2k views

Conditional Custom Option

I have a configurable product that has a few custom options.(i.e. custom text, font color) The product can be ordered with custom text on it and custom font color. What I am trying to achieve is, if ...
0
votes
1answer
1k views

conditions for displaying static blocks

I am working on delivering a customized series of messages via static blocks based on certain conditions a customer possesses. For example, I might like to display one customized offer message vs. an ...
0
votes
1answer
785 views

Conditional loading headline based on category id magento for product page

For SEO reason I would like to display both the name of the parent category and the sub-category in the headline of a catalog page, but only in some cases. I don't want to use it in the original ...
4
votes
2answers
460 views

Call to Magento load() to load a model is slow the first time, fast in subsequent calls?

We have a program where we are trying to import Customers and Orders using php into Magento from a non-Magento system via csv files. In a loop we call this function to get a customer model of ...
2
votes
0answers
125 views

Conditionally loading content for adaptive design server-side with WURFL [closed]

Trying to figure out the best way to only serve content that is needed in a responsive design (as opposed to just hiding hundreds of elements in CSS). I notice at /lib/Zend/Http/UserAgent/Features/...