Skip to content

magento man

Updating custom customer attribute

I want to make one of customer attributes not required I run the below code, but it doesn’t work public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $customerSetup = $this->customerSetupFactory->create([‘setup’ => $setup]); $customerSetup->addAttribute( MagentoCustomerModelCustomer::ENTITY, ‘trade_license’, [ ‘required’ => false ] );… Read More »Updating custom customer attribute

IOFLOOD v 1gservers

I’m considering moving infrastructure providers from OVHCloud, I have a really short list of providers I’ve been looking at, some I’ve had a… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1906830&goto=newpost

Render link attribute in custom page builder content type

Lets assume a custom page builder content type with a text attribute representing a link In master.html I’m already retrieving the following attributes <!–master.html–> <<div attr=”data.main.attributes” ko-style=”data.main.style” css=”data.main.css” > <div class=”homebanner-content”> <h3 attr=”data.title.attributes” html=”data.title.html”></h3> <p attr=”data.description.attributes” html=”data.description.html”></p> <a href=” <div… Read More »Render link attribute in custom page builder content type

Magento 2 show current stock for salable quantity on productpage

I have this code for showing if my product is in stock or not. <?php /* @var $block MagentoCatalogBlockProductViewAbstractView */?> <?php $_product = $block->getProduct() ?> <?php $stockstate = MagentoFrameworkAppObjectManager::getInstance()- >get(‘MagentoInventorySalesApiApiGetProductSalableQtyInterface’); $sale_qty = $stockstate->execute($_product->getSku(), 1); ?> <?php if ($block->displayProductStockStatus()): ?> <?php… Read More »Magento 2 show current stock for salable quantity on productpage