angela-d/abandoned-carts-opencart

Extension does not show in admin menu

doviis opened this issue · 2 comments

Hello,
I have installed the extension manually dragging admin folder to FTP server. When I enabled the extension in admin menu, but nothing else happens. Where I can see abandoned carts?

All I can do is Edit Abandoned Cart Options.

If you add the extension via FTP, you'll also need to add the database entry for the modifications cache.

Those are found in install.xml

Do not edit these files directly.

Instead, you can run this SQL query to insert the cache trigger where it needs to be. It is highly important you first check your existing modifications table to see what the last ID is, you'll have to update my query if you have more than 3 extensions currently installed.

In phpymadmin > look for "modifications" table > on the modification_id row, sort descending (largest number on top) > say the largest number is 5.

At the top of my query below, change it from 3 to 5:

INSERT INTO `oc_modification` (`modification_id`, `name`, `code`, `author`, `version`, `link`, `xml`, `status`, `date_added`) VALUES
(3, 'Abandoned Carts', 'abandoned_carts_ocv126lang', 'Angela', '1.2.6-lang', 'https://github.com/angela-d', '<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<modification>\n    <name>Abandoned Carts</name>\n    <code>abandoned_carts_ocv126lang</code>\n    <description>Reach out to prospects with bailed carts; gain valuable insight to usability and recover lost sales.</description>\n    <version>1.2.6-lang</version>\n    <author>Angela</author>\n    <link>https://github.com/angela-d</link>\n\n    <file path=\"admin/controller/common/header.php\">\n      <operation error=\"skip\" info=\"Language call for the abandoned carts menu link.\">\n          <search ><![CDATA[\n            $data[\'text_order\'] = $this->language->get(\'text_order\');\n            ]]></search>\n          <add position=\"after\"><![CDATA[\n            $data[\'text_bailed_carts\'] = $this->language->get(\'text_bailed_carts\');\n          ]]></add>\n      </operation>\n        <operation error=\"skip\" info=\"Model inclusion for abandoned carts.\">\n            <search ><![CDATA[\n              $this->load->model(\'sale/order\');\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              $this->load->model(\'extension/module/abandoned_carts\');\n\n        			// Bailed Carts\n              $bailed_carts_total         = ($this->config->get(\'abandoned_carts_status\') == \'1\') ? $this->model_extension_module_abandoned_carts->getTotalOrders() : \'0\';\n        			$data[\'bailed_carts_total\'] = $bailed_carts_total;\n        			$data[\'bailed_carts\']       = $this->url->link(\'report/abandoned_carts\', \'token=\' . $this->session->data[\'token\'], true);\n            ]]></add>\n        </operation>\n        <operation error=\"skip\" info=\"Alert total, with any bailed carts summed.\">\n            <search ><![CDATA[\n              $data[\'alerts\'] = $customer_total + $product_total + $review_total + $return_total + $affiliate_total;\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              $data[\'alerts\'] = $customer_total + $product_total + $bailed_carts_total + $review_total + $return_total + $affiliate_total;\n            ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/language/en-gb/common/header.php\">\n        <operation error=\"skip\" info=\"English language definition for bailed carts menu entry.\">\n            <search ><![CDATA[\n              $_[\'text_order\']             = \'Orders\';\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              $_[\'text_bailed_carts\']      = \'Bailed Carts\';\n            ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/language/ar/common/header.php\">\n        <operation error=\"skip\" info=\"Arabic language definition for bailed carts menu entry.\">\n            <search ><![CDATA[\n              $_[\'text_order\']             = \'الطلبات\';\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              $_[\'text_bailed_carts\']      = \'السلات المهجورة\';\n            ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/language/pt-br/common/header.php\">\n        <operation error=\"skip\" info=\"Brazilian Portugese language definition for bailed carts menu entry.\">\n            <search ><![CDATA[\n              $_[\'text_order\']             = \'Encomendas\';\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              $_[\'text_bailed_carts\']      = \'Carrinhos abandonados;\n            ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/language/pt-pt/common/header.php\">\n        <operation error=\"skip\" info=\"Portugese language definition for bailed carts menu entry.\">\n            <search ><![CDATA[\n              $_[\'text_order\']             = \'Encomendas\';\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              $_[\'text_bailed_carts\']      = \'Carrinhos abandonados;\n            ]]></add>\n        </operation>\n    </file>\n\n    <file path=\"admin/view/template/common/header.tpl\">\n        <operation error=\"skip\" info=\"Adds a link in header alerts to bailed carts breakdown.\">\n            <search ><![CDATA[\n              <li class=\"dropdown-header\"><?php echo $text_order; ?></li>\n              ]]></search>\n            <add position=\"after\"><![CDATA[\n              <?php if (isset($bailed_carts_total) && $bailed_carts_total >0) { ?>\n                <li class=\"divider\"></li>\n                <li><a href=\"<?php echo $bailed_carts; ?>\" style=\"display: block; overflow: auto;\"><span class=\"label label-danger pull-right\"><?php echo $bailed_carts_total; ?></span><?php echo $text_bailed_carts; ?></a></li>\n              <?php } ?>\n            ]]></add>\n        </operation>\n    </file>\n</modification>\n', 1, '2018-04-22 17:16:22');

To run it, click the SQL tab while inside the modifications table and drop that inside & hit Go.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.