magento

Trigger observer on Magento order status change events

霸气de小男生 提交于 2020-08-02 05:22:25
问题 I need to automatically create an invoice on an order once it receives the processing status. Which event should be observed in my extension to achieve this? I'm trying but this code is not working, what can it be? .xml in etc/modules <?xml version="1.0"?> <config> <modules> <Atwix_Orderhook> <active>true</active> <codePool>community</codePool> </Atwix_Orderhook> </modules> </config> config.xml in app/code/... <?xml version="1.0"?> <config> <modules> <Atwix_Orderhook> <version>1.0</version> <

Trigger observer on Magento order status change events

倾然丶 夕夏残阳落幕 提交于 2020-08-02 05:22:05
问题 I need to automatically create an invoice on an order once it receives the processing status. Which event should be observed in my extension to achieve this? I'm trying but this code is not working, what can it be? .xml in etc/modules <?xml version="1.0"?> <config> <modules> <Atwix_Orderhook> <active>true</active> <codePool>community</codePool> </Atwix_Orderhook> </modules> </config> config.xml in app/code/... <?xml version="1.0"?> <config> <modules> <Atwix_Orderhook> <version>1.0</version> <

Redis的面试问题总结,面试跳槽必备

[亡魂溺海] 提交于 2020-07-27 22:34:58
1.什么是redis? Redis 是一个基于内存的高性能key-value数据库。 2.Reids的特点  Redis本质上是一个Key-Value类型的内存数据库,很像memcached,整个数据库统统加载在内存当中进行操作,定期通过异步操作把数据库数据flush到硬盘上进行保存。因为是纯内存操作,Redis的性能非常出色,每秒可以处理超过 10万次读写操作,是已知性能最快的Key-Value DB。 Redis的出色之处不仅仅是性能,Redis最大的魅力是支持保存多种数据结构,此外单个value的最大限制是1GB,不像 memcached只能保存1MB的数据,因此Redis可以用来实现很多有用的功能,比方说用他的List来做FIFO双向链表,实现一个轻量级的高性 能消息队列服务,用他的Set可以做高性能的tag系统等等。另外Redis也可以对存入的Key-Value设置expire时间,因此也可以被当作一 个功能加强版的memcached来用。 Redis的主要缺点是数据库容量受到物理内存的限制,不能用作海量数据的高性能读写,因此Redis适合的场景主要局限在较小数据量的高性能操作和运算上。 3.使用redis有哪些好处?   (1) 速度快,因为数据存在内存中,类似于HashMap,HashMap的优势就是查找和操作的时间复杂度都是O(1) (2) 支持丰富数据类型

Magento 2 SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint

北慕城南 提交于 2020-07-20 17:12:07
问题 Hello guys I was getting errors with my Magento 2 Store.. Such as Failed API Requests, Swagger gives 500, Stylesheets and JS files won't load etc.. Finally I found that the best solution to create a fresh Magento installation with fresh theme files and just copy pub/media from files and go with maintenance mode to drop all tables prefixed with customers_ , catalog_ , sales_ and eav_ This step made my new store works very good but I got new kind of errors .. I can't run setup:upgrade it shows

Magento 2.2.6 /var/lib/mysql/ folder is taking 43 gb of disk space

自古美人都是妖i 提交于 2020-07-14 09:45:32
问题 Due to some reason my magento 2 website (Magento ver. 2.2.6) taking too much space from the server . Yesterday there is 1.2 gb available now only 240mb available . Please help on this . Please see the attached picture now UPDATE : I have found that most of the disk space is taken by /var/lib/mysql/webna this folder (42 gb) . Here webna is my database name .In that folder i can see lots of IBD , FRM, MYI files. There is on file inside the webna folder called mageplaza_smtp_log.ibd and it's

Active an extension based on condition in magento 2

本小妞迷上赌 提交于 2020-07-13 15:43:00
问题 Hi i have 2 payment method available in my magento2 store . One is cash on delivery and other is custom payment gateway . I install custom payment gateway extension and it is working fine . Now i have some conditions if that condition is ok then only i need to make active that custom payment gateway extension . My products have a product attribute called 'otherthancod' . If 'otherthancod' is active then only show the custom payment gateway in checkout page. For that i write the following code

Magento(1.7) fatal error while installation

感情迁移 提交于 2020-05-30 02:19:50
问题 I am getting following error while installing magento (1.7) Call to a member function insert() on a non-object in app/code/core/Mage/Core/Model/Resource/Resource.php on line 133, while installing magento 回答1: I given 777 permission to my app/etc folder and my issue resolved. 来源: https://stackoverflow.com/questions/20681106/magento1-7-fatal-error-while-installation

Magento 2: “The store that was requested wasn't found. Verify the store and try again.”

只谈情不闲聊 提交于 2020-05-16 05:42:31
问题 Everytime I'm switching from the English store view to the Italian's one and viceversa, it takes me to the equivalent homepage (no matters where I am) and it throws this error: Here's my setup: Magento 2.3.4 (fresh installation, self hosted) 1 website, 1 store, 2 store views For each store view one different domain (English store view --> example.com, Italian store view --> example.it) I added on top of main .htaccess these env: SetEnvIf Host ^(.*)\.example\.com MAGE_RUN_CODE=en SetEnvIf Host

Magento Limit Number of Products in Home page

故事扮演 提交于 2020-05-09 05:20:37
问题 I have added this code {{block type="catalog/product_list" category_id="25" template="catalog/product/list.phtml"}} in cms home page I want to limit no of products to display to nine to this category only.How can i do that? 回答1: I don't think there is a value you can pass into the block tag to limit it. I would suggest making a new list.phtml file that limits it there. Let me look at the code real quick. Ok. If you were to copy the file /app/design/frontend/default/default/template/catalog