opencart

How can I display the SubTotal on OpenCart on any page?

寵の児 提交于 2019-12-23 19:53:30
问题 Currently the only global PHP command I know is: <?=$text_items?> This spits: 1 item(s) - £318.75 I want to get the 318.75 value so at the moment I am trying a replace but it is not working all smoothly: $short = $text_items; $short = str_replace("£", "", $short); $short = str_replace("£", "", $short); $short = str_replace("-", "", $short); $short = str_replace("–", "", $short); $short = str_replace(" ", "", $short); $short = str_replace("-", "", $short); $short = str_replace("ITEMS", "",

How to set custom price in opencart products?

≡放荡痞女 提交于 2019-12-23 12:26:04
问题 I have downloaded the latest version of opencart (3.0.2.0). The pricing of my product depends on various options viz. size, color , quantity . For quantity, is there any feature by default to set price range, like for 1-500 pieces one price, from 501-1000 discounted price? My products are wristbands, so I calculate price based on text they want to print, size of the band, quantity range . By default opencart has feature for options but my options have sub options (dependent options). I read

Add a Custom Field on Opencart admin 'Order Info' page

痴心易碎 提交于 2019-12-23 08:56:35
问题 I want to add custom field on opencart admin order pages. compare value like if oc_order.order_id = oc_custom_table.order_id then display oc_custom_table.comment on admin order list. display same thing on admin order info page. I added a custom function in admin_model_order.php page where there all all queries. public function getCustomTable($order_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "custom_table WHERE order_id = '" . (int)$order_id . "'"); return $query->rows; }

How do I save a PDF to my root file? DOMPDF

坚强是说给别人听的谎言 提交于 2019-12-23 04:43:35
问题 I am using a free extension of opencart which allows me to download invoice in PDF to my local system (Downloads folder). I want two things to happen I want to download PDF file in my root. (if I am working on localhost I want the file to download in root\abc\ ) The other thing i want is that there is an email textbox and email button what I want is that I want to send email to user(eAddress written in textbox) with auto attachment of that downloaded pdf file located in(root\abc) CODE : $pdf

how to add extra tab without any extension in product page in opencart

被刻印的时光 ゝ 提交于 2019-12-23 03:15:34
问题 how to add extra tab without any extension in product page in opencart may be this is the code for extra tabs any one help? regards <div class="tabs-group"> <div id="tabs" class="htabs clearfix"><a href="#tab-description">Delivery </a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status) { ?> <a href="#tab-review"><?php echo $tab_review; ?></a> <?php } ?> <?php if( $productConfig['enable_product_customtab'] && isset(

Accessing class properties and methods from template

拈花ヽ惹草 提交于 2019-12-23 00:51:17
问题 Prior to Opencart 2.0 class properties could be accessed directly from the template. For example, $this->config->get('config_language') or $this->request->get['route'] were both accessible from an admin template file. With the new method $this->load->view() , neither of these work. Is there a simple way to pass on class methods and properties which are available in the current controller to the tpl without explicitly adding them to the $data array? 回答1: In Opencart version 2, if you want

Adding new modules positions to OpenCart 3

本秂侑毒 提交于 2019-12-22 10:27:20
问题 I am using OpenCart Version 3.0.2 . By default OpenCart has 4 areas where we can drop the modules in our layouts. i.e. Left Column Right Column Top Content Bottom Content My question is if somehow we can drop modules elsewhere also or maybe if we can somehow call a module within the HTML-Module and wrap is with some HTML codes. Basically I am stuck with a design where I wanted to add few dynamic banners in the home page but to display them according to the design, they much be wrapped within

Prevent Wappalyzer from identifying PHP framework

穿精又带淫゛_ 提交于 2019-12-22 08:59:25
问题 I am running an OpenCart application and noticed that Wappalyzer is able to identify the PHP framework used. I checked the headers as well using HTTPLiveHeaders but it doesn't seem to show OpenCart anywhere. Also checked the cookies sent from my application with no success. Does anyone know how to successfully prevent Wappalyzer from identifying the server side stack being used? 回答1: This is easy to solve, if you know the details Wappalyzer looks for. ;) According to the Wappalyzer Source

can we use opencart or zen cart on the phonegap for an ipad app

你说的曾经没有我的故事 提交于 2019-12-22 07:03:50
问题 Can we use opencart or zencart on the phonegap for an ipad app? I want to do a native ipad app using the phonegap framework, can we use php in phonegap? How can i implement open cart template in phonegap,can any one give me some useful tutorial links. 回答1: Ravi, Use of any large framework for small purpose is not a good idea, As far as your requirement is concern, you can fulfill your need by simple XML feed generation Step 1 : Understand Database structure of any Open source. i.e. in Zen

Custom helper functions in OpenCart

泪湿孤枕 提交于 2019-12-22 07:00:16
问题 Trying to create a custom PHP function within opencart. Basically I need to know if we are viewing the cart or checkout pages. I understand the simplest way to accomplish this is by accessing the route request param. I want to create a re-usable function however that is available site wide. Is this possible? Where would it go? The function looks something like this: function isCheckout() { $route = $this->request->get['route']; //is cart? if($route == 'checkout/cart') return 'cart'; $parts =