Fatal error: Uncaught Error: Call to a member function setBodyAttachment() on null in /home/vestuv/web/vestuviniaiziedai.lt/public_html/app/code/Dipolis/Callmeform/Mail/Template/TransportBuilder.php:11 Stack trace: #0 /home/vestuv/web/vestuviniaiziedai.lt/public_html/app/code/Dipolis/Callmeform/Controller/Index/Post.php(77): Getting error while trying to send custom email with attachment In Magento 2.3.3 Sent mail code $fileDirectoryPath = $this->directoryList->getPath(MagentoFrameworkAppFilesystemDirectoryList::VAR_DIR).'/tmp'; $filePath = $fileDirectoryPath . '/' . $_FILES['attachment']['name']; move_uploaded_file($_FILES['attachment']['tmp_name'], $filePath); try { if($_FILES['attachment']['name']){ $fileName […]
Magento1
I built a custom module. Its admin tables with CRUD functionality. I am putting a new button on the grid via the Ui_component listing xml file. When this button gets clicked I want to call a 3rd party API to load data into the current table. This is the code […]
I’ve some JS files included in my themes and modules, but sometimes these files are not loaded, becaused of adblock or CDN server down. I checked the RequireJS documentation and I saw that it’s possible to create a local fallback of these files. How could I include it in my […]
Good afternoon, I would like to know in which class and function can I get my client ID, the same bank saved ID as “entity_id” I would like to “echo” my script so that I can manipulate it for other functions later. This ID is from the connected client. Magento […]
I’m fairly new to Magento API (REST) and am trying to create a cart for an existing customer via admin API, update the cart and apply a discount coupon. So far I’ve hit two major issues: 1) I can’t figure out how to get a clear shopping cart for the […]
Magento 2.2.10 that’s the version I am using. Is it possible to get all the orders where the status is %pending% and manually update the order to cancel if that’s possible
I need to place every category in a separate category column. Like Category_1, Category_2, Category_3….. $categoryIds = implode('|', $product->getCategoryIds());//change the category separator if needed $cat_name = array(); $cat_array = $product->getCategoryIds(); for($k = 0; $k < count($cat_array); $k++) { $id = $cat_array[$k]; $cat->load($id); $cat_name[] = $cat->getName(); } $_cate_name = implode(',', $cat_name); […]
We have a multi store running with Magento 2 and sometimes when we try to load the homepage it shows the JSON below instead of the home page, it only works again if we clean cache. Strange enough is that if we try to navigate in any other page of […]
I’m trying redirect to the login when some guess user press the add cart button and he is not registered. But i can’t do it. I am usin a Observer, with the following event this is my /app/code/vendor/module/etc/frontend/event.xml event.xml < ?xml version="1.0"?> and my Observer/app/code/vendor/module/Observer/ForceLogin.php ForceLogin.php < ?php namespace vendormoduleObserver; […]