opencart

Confusing class and method call in OpenCart

瘦欲@ 提交于 2019-12-22 06:02:34
问题 I have a framework (OpenCart) Controller class (like: catalog/controller/product/product.php) the code looks like: class ControllerProductProduct extends Controller { public function index() { //some code $this->response->setOutput($this->render()); //some more code } } there is an expression like $this->response->setOutput($this->render()); . I know what this expression is used for, but I am pretty confused in how it works. $this refers to current class i.e. ControllerProductProduct , it

Validation Opencart

心已入冬 提交于 2019-12-21 20:16:08
问题 i want to add php phone number validation in opencart code sample is given below if(!filter_var($customer_email, FILTER_VALIDATE_EMAIL)) { $errors[$pos++] = 'Email is not valid.'; } if($customer_mobile=='') { $errors[$pos++] = 'Please enter your Mobile.'; } /*elseif (strlen($customer_mobile) < 11 || !is_numeric($this->request->post['cell_number'])){ $errors[$pos++] = 'Mobile number should be 7 digits.'; }*/ 回答1: @Tayyab Gulsher Vohra.... I am also facing this problem.I concluded myself and

OpenCart show category images on homepage? [closed]

徘徊边缘 提交于 2019-12-21 05:09:20
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I'm using the most up to date version of open cart. What I'm wanting to do is show the image from the store category page on every page page, as I'm wanting to implement it into the menu. You can see what I mean

opencart 1.5 how to add module in a header

给你一囗甜甜゛ 提交于 2019-12-21 04:20:58
问题 Please some one tell me how can I position modules like slider or banner in header or how can we define additional regions for the modules. 回答1: Well, I am working on it. Firstly, you should add a new position in the admin page. Which means you should change three files and add some lines into each. For example, if you want to add slideshow into header, you should add a new position in $this->data['text_header'] = $this->language->get('text_header'); // in admin/controller/slideshow.php /////

How to automatically select checkout options in opencart?

廉价感情. 提交于 2019-12-19 04:50:31
问题 In the shop I'm developing, users can only see prices and add products to cart only if they create an account. After that, they can add products to cart. The options Billing Details & Delivery Details are automatically filled in with the user's address. The delivery method is free and the payment method is "cash on delivery". How can I automatically select these options and hide them so the only step left would be to Confirm the order? I assume the template file I need to change is catalog

Opencart minimum order price

戏子无情 提交于 2019-12-19 04:49:08
问题 I am trying to implement below code from here in catalogue/view/theme/default/template/checkout/confirm.tpl <?php if ($this->cart->getSubtotal() >= 1000) { ?> <div id="payment"><?php echo $payment; ?></div> <?php } else { ?> <div class="warning">Minimum 10 Euro to checkout</div> <?php } ?> but i am getting an error Notice: Undefined property: Loader::$cart in C:\xampp\htdocs\optest\catalog\view\theme\default\template\checkout\confirm.tpl on line 51 Fatal error: Call to a member function

OpenCart subscription model (x months)

浪子不回头ぞ 提交于 2019-12-18 13:48:39
问题 I am setting up an e-commerce site using OpenCart and I want to offer subscriptions. Specifically 3/6/12 months subscriptions. I am NOT interested in recurring billing (I am aware that there are modules for PayPal and Authorize.net). I want users to pay once in advance. Does this translate to 3 pseudo-products from a configuration point of view? I guess this is feasible, so far, just with product configuration. 3 products, each with one price. Here comes the tricky part. For every month the

OpenCart admin menu link url

*爱你&永不变心* 提交于 2019-12-18 13:37:55
问题 I'm verry new to OpenCart and I'm trying to make a module for it. I want a link in the admin menu to the module I am creating thus I've edited this file: /admin/view/template/common/header.tpl The code I have added: <li><a class="top">Import / Export</a> <ul> <li><a href="" target="_blank">Link 1</a></li> <li><a href="" target="_blank">Link 2</a></li> <li><a href="" target="_blank">Link 3</a></li> </ul> </li> My question is propably verry simple: In the normal links the url for the <a href=""

How to make a simple module in OpenCart? Example getting latest posts from Wordpress and showing it in OpenCart?

∥☆過路亽.° 提交于 2019-12-17 21:53:06
问题 I am new to this forum and as well as to OpenCart. I need help on creating a module in OpenCart. In my case it will get the latest 5 posts from each category of my WordPress installation and display it in my home page of my OpenCart store. I have already installed OpenCart and WordPress in same database on the same host. Can someone advice me on this? 回答1: This can be very easy depending on your skills. I expect a downvote on your question but I will briefly run through the steps since this

Remove index.php?route=common/home from OpenCart

假装没事ソ 提交于 2019-12-17 06:37:21
问题 I currently have User SEO URL's set to Yes in OpenCart Admin. System -> Settings -> Store -> Server -> User SEO URL's So far, all tags and SEO links are working; the command has done the desired effect. However for the homepage and a few other links; how do I remove: index.php?route=common/home From the URL? Do I have to literally do a find and replace in the hardcode PHP files and risk upgrades or is there another way? (without bloating performance i.e no poor amateur tools such as vQmod)