Categories
CMS Magento Mastering Development

Scopes in Magento 2

I know that in magento config, we have 3 scopes: Global (default), website and store view. But when I take a look at ScopeInterface, I see 6 scope types interface ScopeInterface { /**#@+ * Scope types */ const SCOPE_STORES = ‘stores’; const SCOPE_GROUPS = ‘groups’; const SCOPE_WEBSITES = ‘websites’; const SCOPE_STORE = ‘store’; const SCOPE_GROUP […]

Categories
CMS Magento Mastering Development

Magento 2 multiple AND/OR conditions

I have a collection and I want to filter like this: WHERE field1 >= ‘2020-01-01’ OR (field2 == ‘open’ && $field3 == 1). How can I achieve that?

Categories
CMS Magento Mastering Development

How to Exclude Tags

In my Magento site, we found there was configuration in admin. Admin -> Store -> Configuration -> Advanced -> Developer (Enabled only on Developer mode). JavaScript settings -> Move JS code to the bottom of the page When this is YES, all the scripts tags on the site moves to the bottom of the page. […]

Categories
CMS Magento Mastering Development

Removing images from product – problem with database data

I am trying to remove specific images, by given product ID and img value id. My initial data is with array of product ID-s My problem is that, when I use my custom function, everything seems fine, the images which I want to remove are removed, but still, ONLY after the first given product ID, […]

Categories
CMS Magento Mastering Development

Uncaught Error: Using $this when not in object context

I am going through an older module created in PHP 5.x.x and we have just moved the website to the php 7.2.x so we suddenly got the error in a helper class Uncaught Error: Using $this when not in object context in There is a dispatch event in helper that is using the following code […]

Categories
CMS Magento Mastering Development

how to save ui htmlcontent input fields in product save/edit form

i have added some fields in my product form using htmlcontent like below: <htmlContent name="properties" sortOrder="20"> <argument name="data" xsi:type="array"> <item name="wrapper" xsi:type="array"> <item name="label" xsi:type="string" translate="true">Properties</item> <item name="collapsible" xsi:type="boolean">true</item> <item name="opened" xsi:type="boolean">true</item> </item> </argument> <settings> <wrapper> <canShow>true</canShow> <componentType>fieldset</componentType> </wrapper> </settings> <block name="properties" class="Offer\CedProductFastEntry\Block\Helper\Form\Properties" template="Offer_CedProductFastEntry::product/properties.phtml"> <arguments> <argument name="config" xsi:type="array"> <item name="parentComponent" xsi:type="string">product_form.product_form.block_properties</item> </argument> </arguments> <block as="content" […]

Categories
CMS Magento Mastering Development

How to get the VAT value into checkout page from my account information

How to get the VAT value into checkout page from my account information when customer register they enter the VAT number that will save in account information page but same VAT number not shown in checkout page can anyone please help me.

Categories
CMS Magento Mastering Development

Magento 2 – All configurable products are showing as “not in stock”

Not sure whats going on. All my configurable products are showing as "not in stock" in the frontend and there is a message saying "Notify me when this product is in stock". I have set Stores -> Settings: Configuration -> Catalog -> Inventory -> Product Stock Options -> Manage Stock to No but it still […]

Categories
CMS Magento Mastering Development

Auto Draft

Categories
CMS Magento Mastering Development

Auto Draft