Ok, clickbait title I admit. My team is already on board with unit tests. I’m holding a small presentation on the benefits and possible downsides of unit tests. I already have a good idea on what to say in it, but another point of view can never hurt. We’re planning […]
Daily Archives: March 8, 2020
I am trying to save custom options(drop_down type) for a specific product. In my case I need add custom option in loop. My code is here $json ='{"productID":"1","productPrice":"5585.00","productDetails":{"productImage":"https://development.modeconfigurator.com/eCommerce/backdrop.jpg","TABLE TOP":"COPPER DISTRESSED","TABLE FRAME":"RAL 5024 PASTEL BLUE"},"_":"1583172411557"}'; $jsonDecode = json_decode($json, true); foreach ($jsonDecode["productDetails"] as $key => $value) { $options = [ 0 =>[ […]
Hi I want to save a shipping address attribute by observer sales_model_service_quote_submit_before Bellow My observer: public function execute(Observer $observer) { $quote = $observer->getEvent()->getQuote(); $fields = $this->fieldsManagement->getByQuoteId($quote->getId()); $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $resource = $objectManager->get('MagentoFrameworkAppResourceConnection'); $customer_res = $objectManager->create('MagentoCustomerApiAddressRepositoryInterface'); $customer = $customer_res->getById(101); $shippingAddress = $quote->getShippingAddress(); $shippingAddressExtensionAttributes = $shippingAddress->getExtensionAttributes(); if ($shippingAddressExtensionAttributes) { $customField = $shippingAddressExtensionAttributes->getDistance(); […]
I have an unusual problem with a range of items on my Magento store that after a few days, disappear from the category pages. If I go into the back end, disable those specific items and then re-enable them again, once Magento re-indexes the products appear again (no manual re-index […]
I want to add my custom fields and edit grids in admin sales order create page. The layout file consist of blocks and child blocks (link to layout). I would like to add my block after ‘search’ block. Sadly I can’t do this because it is child of ‘data’ block […]
Just as the title says, how do I get a product’s category name or id when I get that product’s information? I’m querying for a product’s information via catalogProductInfo, and I am also passing in a list of additional_attributes (which includes categoryId). However, the value for every product, no matter […]
I have a problem. I have created an excel and I want to see the changes in a graph. excel table picture in the picture A3 has no function but H3 is changing according to various functions. So I am interested in what happens to H3 when I change A3. […]
here is my problem: with excel, plot 2 series on one line, where the first series has a changing size. Here is an example to better understand it: List_1: can be [0,1,2,3,4,0] or [0,1,2,...,15,16,0] List_2: is always the same, eg: [0,1,2,3,0] Time : I have a time column to use […]
I am setting up vital infrastructure for a software company in Microsoft Azure. I would like to prevent a worst-case scenario, where someone (I imagine a disgruntled IT employee) can delete these vital resources and essentially wipe out the company. I have searched the web of course, but almost all […]