opencart

Opencart successful order ID and Total from JavaScript

雨燕双飞 提交于 2019-12-01 11:36:47
问题 I need to run JavaScript on the successful order's page and get two things: order ID and total order amount. The code looks like: <script type="text/javascript"> // Some code here arr.push([ "create_order", {order_id: "*order_id*", sum: *sum*} ]); </script> Questions Where should I paste my script? If into success.tpl than where exactly? If into header.tpl than how to run it only on the page of successful order? Which variables I should to use? I have tried this, it did not work: {order_id: "

How to get products in JSON format from OpenCart using phonegap/jQueryMobile

戏子无情 提交于 2019-12-01 11:01:16
问题 Is there anyway, to fetch product catalog in JSON format from my OpenCart store, from a phonegap mobile application using Ajax, JavaScript/jQuery. Does OpenCart allow for such a thing? Any ideas or code are welcome :) 回答1: OcJoy is going right way but the solution provided will contain all the page data which I guess is not Your desired output. Instead of his solution, You should do something like this (assuming You need only the products JSON array) before $this->response->setOutput($this-

OpenCart - not sending emails (notifications or contact page)

◇◆丶佛笑我妖孽 提交于 2019-12-01 07:52:49
问题 As far as I can tell, my mail settings are configured correctly but I'm not receiving any emails, not through the contact form, nor for new customers or any orders that are placed. Here are my current settings: I've tried: Changing to SMTP, I get an error and my host (IXWebHosting) says I need to disable Authorization within the application, and I cannot see an option to this Adding -f and -F before the email as suggested here Adding different emails to the 'also send to' box at the bottom of

OpenCart: How to accurately populate oc_category_path

心不动则不痛 提交于 2019-12-01 01:30:16
问题 I have used an online service to transfer data from my other ecommerce website into OpenCart and everything seems to have been transferred correctly. There is however one issue with the product categories. The categories have been transferred to the oc_category table; however, looks like there is another table called oc_category_path that needs to be populated as well if I want to be able to edit my categories in the admin. Do you know what this table is and how I can correctly populate it

扩展功能的模块与插件

a 夏天 提交于 2019-11-30 21:16:05
OpenCart 的模块和插件管理 是比较简单的。OpenCart 的物流,支付,以及模块扩展都是安装在 admin 和 catalog 的 shipping, payment 和 module 目录上。 直接从官方网站或者 cnopencart.com 上下载到相应的插件,按照说明,把文件解压,然后到 后台 扩展功能 功能菜单,配置相应的参数,即可完成安装。以下以模块安装为例: OpenCart-扩展功能-模块管理 点击安装后,在点击编辑进入配置页面。 OpenCart-扩展-模块-安装 点击添加模块 OpenCart-扩展-模块-添加 各个模块的参数都是不一样的。具体配置需要根据具体的模块为准。模块的公共参数,是 Layout(布局,就是在设计菜单中设置的布局参数),Position(显示位置),Status(状 态),Sort Order(排序,当页面存在多个模块的时候,在页面上的排序),配置完毕后,点 击保存即可。 OpenCart-扩展-模块-参数配置 然后我们到前台上去看下吧 OpenCart-扩展-模块-最热商品 从上图可见, 刚配置的 most view 插件显示在分类页面的左侧。 几款必要 opencart插件有: 1. OpenCart支付宝插件 支持直接到账, 双接口, 担保交易等三种接口. 支持 OpenCart v1.4.x, v1.5.x 演示和下载地址

OpenCart: Where is the div for the drop down header cart info?

瘦欲@ 提交于 2019-11-30 17:47:11
I am trying to style OpenCart but am having difficulty finding which TPL file holds the div that appears when you click the Shopping Cart icon in the header (the 'mini cart' that slides down - it allows you to view what's in your cart without going to the cart page). Does anyone know where I can find the .tpl file that has this div (in the default structure template)? Thanks Why did people downvote you? The #content DIV sits within the #cart DIV - you should have searched this. Open /catalog/view/theme/default/template/common/header.tpl The cart header is in the echo <?php echo $cart; ?> To

opencart - How to manually display a module inside a template file?

大憨熊 提交于 2019-11-30 15:19:32
Let's say I want to display the specials module on the homepage in a position different than $content_top, $content_bottom, $column_left or $column_right. How do I do that? If you have some experience with this, could you give me some pointers? The module will be display in home.tpl but I'm assuming I would need to edit the controller file home.php To do this, you will need to make edits to two files Firstly, you will need to edit the controller. In this example, I'm going to add the specials to the home page So open the controller file catalog/controller/common/home.php . Somewhere before

OpenCart subscription model (x months)

余生颓废 提交于 2019-11-30 10:58:15
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 users have paid they have access to order a product, only once a month, within their "billing cycle". So

Adding CSS stylesheet to pages based on route in OpenCart

痞子三分冷 提交于 2019-11-30 09:43:02
I'm using opencart (version 1.5.1.3.1) for a client store, and am wondering what the best way to code it so I can have certain stylesheets added for certain routes. For example, on my category page I'd like to have a different stylesheet to the default one, or one that will over ride the default styles with my custom sheet. I have use for this for more than one route obviously, and want to do this with as little edits required as possible, so as to reduce the amount of edits in the framework should I need to upgrade at any stage (and with opencart's well known random changes and bug fix

opencart php custom page without using the “information” feature

这一生的挚爱 提交于 2019-11-30 09:14:05
I want to create a custom page in opencart. I know I can put a custom page in the information section using the admin area however what I would like is a controller which points to a few other pages. I dont fully understand how to do this. In codeigniter you would create a controller and a view and if needed setup some rules in the routes file but I cannot see anything like this. Would somebody mind explaining or pointing me to some instructions on how to do this please. Thank you It's pretty simple to do to be honest. You need to create a controller for your file, naming based on the folder