Magento Recycle Bin Overview & User guide Copyright CRM4Ecommerce.COM Address: 25 Kham Duc - Cho Kham Thien street, Dong Da, Hanoi, Vietnam Phone: +84 914 646 840 Email: support@crm4ecommerce.com Version 1.2
TABLE OF CONTENTS 1. INTRODUCTION... 3 1.1. What is Magento Recycle Bin?... 3 1.2. Where are outstanding features?... 3 1.3. Who need this product?... 4 1.4. Compatibility... 4 2. INSTALLATION & ACTIVATE MODULE... 4 Step 1: Upload module package into your Magento site s root folder... 4 Step 2: Refresh cache and Admin User s Role... 4 Step 3: Activate module... 4 3. HOW TO USE?... 5 3.1. Setup data types that their data can be moved to Recycle Bin after record is deleted... 5 3.2. Deleting permanently and restoring the deleted records... 7 3.3. Statistic rate of restored items on all of deleted items... 8 3.4. Adding more data types (from 3rd party modules) can be move data to Recycle Bin... 9 3.5. Demo Links... 12 4. POLICIES... 12 4.1. Refund Policy... 12 4.2. Support & Bugs Fixxing Policy... 12 4.3. Upgrades Policy... 12
1. INTRODUCTION 1.1. What is Magento Recycle Bin? Have you ever accidentally deleted any product, category, customer or cms page... from your store? And then, What did you do? Re-create new data for deleted items? However, how do you do to link new items with related records? Magento Recycle Bin is an useful extension for enhance the power of magento store when allow managing and restoring the data that are deleted unlike as we wish. Figure 1: Module Dashboard 1.2. Where are outstanding features? Create virtual recycle bin for 15 magento data types includes: Products, Product's Attributes, Attribute Sets, Categories, Product's Reviews, Customers, Customer's Addresses, Customer's Groups, Catalog Price Rules, Shopping Cart Price Rules, Newsletter Templates, Newsletter Subscribers, CMS Pages, CMS Static Blocks, CMS Widgets; Allow store's owners can actively delete permanently or restore intactly deleted items (unchanged data id) in recycle bin; Statistic rate of restored items on all of deleted items; Allow adding more data types (from 3rd party modules) can be move data to Recycle Bin (HOT); This is a FREE tool for Magento Community Edition; Open source code. 3
1.3. Who need this product? Magento store s Merchants who has many products and employees. 1.4. Compatibility Magento Editions: 1.x (Community & Enterprise). 2. INSTALLATION & ACTIVATE MODULE It is so easily with the 3 clearly following steps: Step 1: Upload module package into your Magento site s root folder After purchasing, your downloadable files and serial key will be sent to your email. The file that you can download normally is a zip file has name crm4ecommerce_recyclebin-{{version-number}}.zip, let use FTP client (like Filezilla, WinSCP, cuteftp...) to upload (copy) all folders and files in this package to your Magento site s root folder. This will not overwrite any existing files, it only add new files to the folder structure. Step 2: Refresh cache and Admin User s Role After uploading is done, let log in your Magento Administration Panel to refresh cache: Go to System >> Cache >> Management, select all caches, take action Refresh and Submit. Then, let refresh permission role of your current admin user: Go to System >> Permission Role, edit role of current user and click re-save (if current user has full rules1) or click save after check rule2 CRM4Ecommerce Extensions >> Recycle Bin and rule System >> Configuration >> CRM4Ecommerce Recycle Bin Settings. If you see menu CRM4Ecommerce Extensions >> Recycle Bin or navigate to System >> Configuration, if you can see tab CRM4Ecommerce Extensions and you can see menu item Recycle Bin on menu bar, it means extension was installed successfully. Step 3: Activate module Log in CRM4Ecommerce Web page by your registered account, go to My Account >> My Serial Keys to get Serial Key. Back to your Magento Administration Panel, go to CRM4Ecommerce Extensions >> Recycle Bin (if you get Access Denied, let log out of Admin Panel and re-login or re-do Step 2), in Block Serial Key Information let change 1 When you see Resource Access is All or All check options in this field are checked. 2 Each rule is a check option in Resource Access. 4
Module Status to Enabled, input your Serial Key to Serial Key field then click Save Config. If you see your website notice Thank you for registering for url {{site base url}} and information in Serial Information and Start Date are shown that mean you activated module successfully. Figure 2: Module Settings Activated module 3. HOW TO USE? 3.1. Setup data types that their data can be moved to Recycle Bin after record is deleted Open Module Settings, in Block Module Settings: Select data types that you want their data will be moved to Recycle Bin after record is deleted, then Save Config; In default config, there are 15 data types (are Products, Product's Attributes, Attribute Sets, Categories, Product's Reviews, Customers, Customer's Addresses, Customer's Groups, Catalog Price Rules, Shopping Cart Price Rules, Newsletter Templates, Newsletter Subscribers, CMS Pages, CMS Static Blocks, CMS Widgets) that we can move data into Recycle Bin after records of these data types are deleted; Besides 15 built-in data types, we can to add more data type from modules 3rd party (see more in Section 3.4); The best choice is select all default data types. 5
Figure 3: Setup Recycle Bin After setup, each time you delete a record of configured data tye, this data will be moved to Recycle Bin. The below figures are example when we delete a product category (category Men): Figure 4: Delete a product category Then, this category (Men) will be moved to Recycle Bin immediately with status is Deleted (deleted user, deleted time, deleted number number time delete record will be saved) and not shown in the category tree and list. 6
Figure 5: Recycle Bin Deleted Items Category that has just deleted was moved to Recycle Bin 3.2. Deleting permanently and restoring the deleted records Firstly, let assign the bellow rules into User s Role: CRM4Ecommerce Extensions >> Recycle Bin >> Deleted Items >> Permanently Delete and Restore Data. Figure 6: Assign rules Then, comeback Deleted Items and select records that you want to delete permanently (remove to database) or restore (re-show on related lists) and do corresponding action (delete permanently / restore data). 7
Figure 7: After assign rules, in Module Dashboard (tab Role Information) Permanently Delete & Restore Data will be changed status to Yes 3.3. Statistic rate of restored items on all of deleted items In Module Dashboard, tab Deleted Items will show statistic rate of restored items on all of deleted items. Figure 8: Module Dashboard Statistic rate of restored items on all of deleted items 8
3.4. Adding more data types (from 3rd party modules) can be move data to Recycle Bin Step 1: Setup data type in config file: Create xml config file contains information of data types that we want to move data into Recycle Bin each time a record is deleted. The bellow is structure of xml file: <crm4ecommerce> <datatype> <id>20</id> <label>bargain Price: Items</label> <model>productbargainprice/session</model> <module>crm4ecommerce_productbargainprice</module> </datatype>... </crm4ecommerce> Notice that: Each data type in a datatype tag (allow setup multi data types in a xml config file); id: Data type Id (this is a number and a unique key); label: Name of data type; model: Name of model in 3rd party module that you want to move data into Recycle Bin after data is deleted; module: Key (name code) of 3rd party module contains configured model. Figure 9: Example for xml file After that, let upload this config file into folder app\code\local\crm4ecommerce\recyclebin\data\datatype. 9
Figure 10: Upload config xml file into server Then, store will show all data types from the 3rd party modules. Figure 11: Show new configured data types in Module Settings Step 2: Add column is_deleted into database table of model class: ALTER TABLE MODEL_TABLE_NAME ADD COLUMN `is_deleted` smallint(6) NOT NULL default '0'; Example: If data table of model productbargainprice/session in module CRM4Ecommerce_ProductBargainPrice is crm4ecommerce_productbargain price_session, let run sql command: 10
ALTER TABLE crm4ecommerce_productbargainprice_session ADD COLUMN `is_deleted` smallint(6) NOT NULL default '0'; Step 3: Customize code in configured model: Open configured model, example is class CRM4Ecommerce_Product BargainPrice_Model_Session, open code file of this class, let override method delete and add new method restore as the bellow: public function delete($deletepermanently = false) { if ($deletepermanently) { return parent::delete(); } if (/** Check module Recycle Bin is active */ && Mage::helper('recyclebin')>canMoveToRecycleBin('ID OF DATA TYPE (ID IN CONFIG FILE)')) { $name = 'NAME_OF_CURRENT_OBJECT'; Mage::getModel('recyclebin/deleted_item')->saveItem($this->getId(), $name, 'ID OF DATA TYPE (ID IN CONFIG FILE)'); try { $coreresource = Mage::getSingleton('core/resource'); $write = $coreresource->getconnection('core_write'); $sql = "UPDATE `MODEL_TABLE_NAME` SET `is_deleted` = 1 WHERE `MODEL_TABLE_KEY_ID` = '". $this->getid(). "'"; $write->query($sql); } catch (Exception $ex) {} return $this; } else { return parent::delete(); } } public function restore() { try { $coreresource = Mage::getSingleton('core/resource'); $write = $coreresource->getconnection('core_write'); $sql = "UPDATE `MODEL_TABLE_NAME` SET `is_deleted` = 0 WHERE ` MODEL_TABLE_KEY_ID` = '". $this->getid(). "'"; $write->query($sql); } catch (Exception $ex) {} } With model class CRM4Ecommerce_Product BargainPrice_Model_ Session, in the above code, MODEL_TABLE_NAME is crm4ecommerce_ productbargainprice_session, MODEL_TABLE_KEY_ID is session_id. To check module Recycle Bin is active, you can add this method into helper class of your module: 11
public function isrecyclebinactive() { if (Mage::helper('core')->isModuleEnabled('CRM4Ecommerce_RecycleBin')) { return Mage::helper('recyclebin')->isRegistered(); } else { return false; } } 3.5. Demo Links Magento Frontend: https://www.crm4ecommerce.com/demo/magentozohocrm/; Magento Backend: https://www.crm4ecommerce.com/demo/magentozohocrm/admin/index/index/extension/recyclebin >> Choose Extension you want see demo is Magento Recycle Bin > Login; Contact us (support@crm4ecommerce.com) to get the own demo. 4. POLICIES 4.1. Refund Policy This is a FREE tool for Magento Community Edition so you needn t to pay any fund to get it. With Magento Enterprise Edition, you can request refund in 30 days from you purchased if our module has errors and our support department couldn t help you fix them. Moreover, if you need we help you install & config it, you need pay fee is $30 and this fee is not-able to refund. 4.2. Support & Bugs Fixxing Policy CRM4Ecommerce.COM offers 6 months of free support for all customers purchased or use services from us. Customers are free to report any bugs experienced while using our products. We will try to fix the bugs at the earliest possible time. To report bugs or complain about our support, please use our Help Desk System. When 6 months free support is ended, to get support and bug fixing service, you need to pay fee $30 per support month for us (pay per month). 4.3. Upgrades Policy CRM4Ecommerce.COM do upgrades regularly to add new requests from customers or make products work with newer versions of Platforms. Customers who purchased product from CRM4Ecommerce will get update for that product. They can download update packages from My downloadable section after logged in. We also keep customers with update information by email newsletter monthly. 12