Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [condition]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

Get condition set in the admin widget in the product loop?

Is it possible to get the condition value set in the admin widget and display it in the product loop template? For example, in my theme /lumachildtheme/Magento_CatalogWidget/templates/product/widget/...
Jesse Lange's user avatar
2 votes
1 answer
1k views

Magento 2: Custom cart price rule condition

I want to create a cart price rule condition that checks for a cart item's buyRequest object to act upon it accordingly. A rule should only be applied when that buyRequest contains a certain value. I ...
omsta's user avatar
  • 698
0 votes
1 answer
252 views

Magento 2 How to validate newly added field in cart price rule

I have added a new field in the Cart Price Rule form as below. I have saved the value in the table as a new column <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi=&...
Jancy Abraham's user avatar
0 votes
1 answer
565 views

Magento 2 How to Get List Products from Cart Price Rule Condition

I want to get the cart price rule applicable products list in my block. How can I get it? For catalog rule, at vendor/magento/module-catalog-rule/Model/Rule We have the method getMatchingProductIds() ...
Jancy Abraham's user avatar
0 votes
1 answer
87 views

Validate if render referenceBlock in checkout layout

I have tried validate if render referenceBlock in checkout layout, but it does not work. I added block Vendor\Module\Block\Index in layout after referenceBlock Vendor/Module/view/frontend/layout/...
Diego Castro's user avatar
2 votes
0 answers
107 views

How do I retrieve data from Conditions

I have a problem. I created a widget where inside <parameters> I have a field with conditions. <parameter name="products" xsi:type="conditions" visible="true" ...
mrcl's user avatar
  • 37
1 vote
1 answer
49 views

How to add AND OR AND conditions in a product collection?

ORIGINAL POST Comment ajouter des conditions ET OU ET dans une collection de produits? comment pourrais filtrer une collection de produit par: (attribut A : condition A And attribut A : condition B) ...
Abdallah JARRAY's user avatar
0 votes
1 answer
36 views

How to fusion an AND et OR filter/condition in Magento?

how to fusion this instructions: $collection->addFieldToFilter('updated_at', ['from' => $from]) ->addFieldToFilter('updated_at', ['to' => $to]) or $collection->...
Abdallah JARRAY's user avatar
0 votes
1 answer
410 views

Hide link navigation customer account on specific condition

I'm would like to know if it's possible to hide a navigation link of the Customer Account dashboard depending on a condition. For example, I would like to display this block only if customer has a ...
ccreusat's user avatar
0 votes
1 answer
173 views

conditional knockout with ajax response

I created an default template for items in the minicart. The difference to the default template should be shown only under a specific condition. <!-- ko if: $parent.myvalueactive(product_sku)==...
Mario's user avatar
  • 478
1 vote
0 answers
91 views

Magento 2 how to add customer chooser in cart price rules condition

I want to add customer chooser in cart price rules conditions like category and product chooser. Can anyone help me with this?
MK Patel's user avatar
  • 422
0 votes
0 answers
137 views

Magento 1.9 Observer - How do visible selected payment gateway only for specific customer group?

Following code return customer group, how to add condition if customer group "Tester" then only show selected payment gateway? app\etc\modules\Gta_FindPaymentGateway.xml <?xml version="1.0"?> &...
zus's user avatar
  • 165
0 votes
1 answer
235 views

How to remove trailing slash adding in pagination urls

I have added code in my htaccess to add trailing slash in my Magento 2.3.2 website URLs. I want to exclude the pagination pages including questions to add a trailing slash. For example - I have ...
chanchal's user avatar
  • 417
2 votes
1 answer
429 views

How to hide some option in condition field in admin?

How to hide some option in condition field in admin? I used this blog to create a condition action: https://www.mageworx.com/blog/2016/09/magento-2-module-with-conditions-model-fieldset/
Divya Sekar's user avatar
  • 1,485
0 votes
2 answers
2k views

Magento 2 cart rule conditions and action to exclude specific product using sku

I have added cart rule and its working properly, I need to exclude specific product from cart rule and others to go with cart rule. EX: sku1 need to exclude from cart rule. 1.Only "sku1" in the ...
BathiyaD's user avatar
0 votes
0 answers
60 views

filter product follow condition magento 2

public function getLoadedProductCollection() { $this->_limit = (int) $this->getWidgetCfg('limit'); $type = $this->getTypeFilter(); $fn = 'get' . ...
MichaelHa's user avatar
  • 661
2 votes
0 answers
461 views

filter product list follow condition in custom module magento 2

public function createCollection() { /** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */ $collection = $this->productCollectionFactory->create(); if ($...
MichaelHa's user avatar
  • 661
3 votes
3 answers
591 views

Condition on Custom Tab in Customer Account page

app\code\companyname\modulename\view\frontend\layout\default.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
HaFiz Umer's user avatar
  • 1,661