Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [obsever]

The tag has no usage guidance.

0
votes
0answers
19 views

when i select custom shiping method my other shipping methods not working in magento 2

i have two shipping methods 1)Custom shipping 2)Free shipping when i select custom shipping it works fine when i choose free shipping showing error on checkout undefined index : ...
0
votes
2answers
35 views

undefined index in $cookie['test'] in Magento 2 checkout observer

The shipping method custom module's observer shows error checkoutobservershipping.php if ($_COOKIE['pickupStoreVal']) { $id = $_COOKIE['pickupStoreVal']; $...
0
votes
1answer
33 views

Who can help, why the redirect does't work when the product is added to the cart?

Redirecttohome.php namespace namespace\modul\Observer; use Magento\Framework\Event\Observer; class RedirectToHome implements \Magento\Framework\Event\ObserverInterface { protected $...
0
votes
0answers
42 views

Get order id and product id while order placed using Observer | Magento 2

Hi i need to get the order id and product id while order is generated in magento2 <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
166 views

How can Save API respond (For each order request - PDF file) with order id in database?

I create event with observer and execute it . In execute function I get API respond (PDF file) for each order request . How can save this pdf link with order id in table I create it (Install schema) ?
0
votes
4answers
573 views

How to use “sales_quote_collect_totals_before” Observer in magento2?

I want to use event sales_quote_collect_totals_before observer in Magento2.
2
votes
1answer
910 views

How to create custom event and observer?

I know about how to use Magento 2 core events. But I want to know how to create custom events and how to override the controller. advance thanks
1
vote
1answer
335 views

How to stop flow from observer in Magento2 without using die or exit?

I have a custom observer and I am intercepting calls in some situation I want to return some specific data and prevent Magento to proceed with its flow, how can I achieve this without using die or ...
4
votes
2answers
952 views

Magento 2 How To Add Custom Text After All Prices

I tried to add custom text after all prices that appears in magento 2. For this I tried to do in 2 ways: 1) I tried to modify function getPrice from module-catalog\Model\Product.php like this: ...
0
votes
2answers
86 views

Magento looks for my custom local module under namespace Mage

I've created a custom module with an Observer to log every product change on a log file. The Observer is listening on the event catalog_product_save_after. I've created the folder for my namespace ...
1
vote
1answer
36 views

while placing order getting slow in magento

Iam using custom plugin in magneto1.9.2.4,while placing the order it takes nearly 2minutes time to place the order.when i disabled the plugin it getting speed to place the order. In that plugin ...
1
vote
0answers
251 views

Set discount price without using coupon in magento 1.9

Am trying to set discount price without using coupon. Discount apply but i have creating a checkbox in checkout/onepage if i click checkbox discount apply else discount don't apply here. Following my ...
2
votes
1answer
1k views

How to call observer in controller

I want to call observer in controller using if condition this is my code app\code\local\EPayment\EPayment\controllers\IndexController.php class EPayment_EPayment_IndexController extends ...
0
votes
0answers
259 views

magento 2 , write custom query in customer_address_entity, We can't save the address

I am trying to add a custom field(customer_type) value using observer to customer_address_entity table.The edit is done in BeforeAddressSaveObserver.php file. The problem is the field is not getting ...
3
votes
0answers
177 views

Prevent place order using observer in magento 2

Hi I'm trying to prevent placing order with the help of observer i have already trigger the event "sales_order_place_before" with this i got all the details of the order like products in cart ,...
0
votes
2answers
766 views

Class observer in config.xml doesn't work

I have some issue in my Event Observer in config.xml whose the class doesn't work: config.xml <?xml version="1.0"?> <config> <modules> <Prince_Cart> &...
3
votes
2answers
2k views

How to get post values in catalog_product_save_after observer in Magento 2?

<?php namespace Maxime\Helloworld\Observer; use Magento\Framework\Event\ObserverInterface; class Productsaveafter implements ObserverInterface { public function execute(\Magento\Framework\...
0
votes
2answers
552 views

Cart items will not be deleted in observer

I searched a lot but none of the solutions worked for me, I am trying to delete an Item from observer but if there is only one item in cart it works with removeAllItems() but if there are more than ...
1
vote
1answer
1k views

'catalog_category_save_commit_after' this same event is available in magento2?

I have tried to get the category id to store in my custom table with some values like cat_id, custom_value. here i googled and get "catalog_category_prepare_save" to get category object when saving ...
1
vote
1answer
432 views

How to get details of single products of a grouped product in observer

I wrote public function catalogProductTypePrepare($observer) { $quote = Mage::getSingleton('checkout/session')->getQuote(); $product = $observer->getEvent()->getProduct(); ...
1
vote
1answer
22 views

How do I run code if and only if certain items are successfully added to the Cart?

I have 4 products with IDs: FreeSilver = 9575 Silver = 9576 Gold = 9577 Platinum = 9578 If anyone adds those specific items I want to run different codes to update customer attributes. is ...