opencart

Reading a HttpRequest post data on OpenCart

吃可爱长大的小学妹 提交于 2020-01-06 03:26:07
问题 I am sending a HTTP request from a C# windowsform application to an OpenCart store. This is what fiddler is showing that I'm sending, which looks correct. This is the code I have in my OpenCart project that I'm calling. class ControllerEAOpenCartProducts extends ControllerEAOpenCart { public function createProduct() { print_r($this->request); } } The print_r is outputting the following data which doesn't appear to be containing any of my JSON data. The content type of the requst also seems to

Redirecting URL with dynamic URI segment in cpanel

ⅰ亾dé卋堺 提交于 2020-01-05 12:26:15
问题 <a href="www.mysite.com/index.php?information/adminpanel/<?php echo $id;?>" name="approve" id="approve" ">Approve >></a> When I am redirecting to this url it shows correct id in url but gives page not found error. I am new to cpanel. Please tell me is there any other way I can pass this id or how to route page in cpanel with uri segment. 回答1: Most probably you are missing a part in URL unless you have changed the routing in .htaccess file somehow. The right URL should most probably be (if you

Opencart: How to include a script on certain pages?

时间秒杀一切 提交于 2020-01-04 06:11:14
问题 I'd like to include a script to detect $_GET values on certain pages of the site. If I use the script in header.tpl , it will add the script on all pages. If I use it as a template file and display it as Layout in the Extensions > Modules, it gets added to all the pages within that Layout. Is there a way to include this only on certain selected pages? I'm sure this will have to done programatically. Just wanted to find out if there is an elegant way to do this. 回答1: You can access the $_GET

How to add custom fields to the order_invoice.tpl, OpenCart 2.0

你离开我真会死。 提交于 2020-01-04 05:47:11
问题 I have searched far and wide for this answer on the web, and nobody seems to have an answer. I know that in OpenCart 2.0 you have the ability to add custom fields in the registration process. I have added 3. I see that they are showing up in the Order Details section of an order, but I need them to show up on the printed invoice too. The code that outputs the custom fields in the order_info.tpl is as follows: <?php foreach ($account_custom_fields as $custom_field) { ?> <tr> <td><?php echo

How to add sub options in Opencart?

旧城冷巷雨未停 提交于 2020-01-03 21:10:40
问题 I am using the latest 3.0.2.0 version of opencart. For options I want to add sub options, also I want to have pricing for sub options as there is for options. There is a lot of talk about dependent options from 2009 and earlier for opencart, but it never came in core release. Why is everyone saying that it is too difficult to implement dependent options ? What is the solution ? Option Colour RED (+$2) Sub option Size Small (+$3) Medium (+$4) Large (+$6) Option Colour BLUE (+$2) Sub option

Opencart: How to relate product options (like size and color)?

别等时光非礼了梦想. 提交于 2020-01-03 01:52:32
问题 I'm using opencart version 1.5.5.1 for our website. I need to add more than one option for products. For example: I need to show shirts of sizes- Large/Medium/Small and colors White/Black/Blue/Red/Green etc. By default opencart allows us to add separate quantities for each color and size. How can I mention that we've 5 Large Shirts of Blue Color, 3 Medium Shirts of White Color etc. ? Please help. Thanks in Advance! 回答1: I guess this would only be possible if You create an options for size x

Opencart: How to relate product options (like size and color)?

馋奶兔 提交于 2020-01-03 01:52:27
问题 I'm using opencart version 1.5.5.1 for our website. I need to add more than one option for products. For example: I need to show shirts of sizes- Large/Medium/Small and colors White/Black/Blue/Red/Green etc. By default opencart allows us to add separate quantities for each color and size. How can I mention that we've 5 Large Shirts of Blue Color, 3 Medium Shirts of White Color etc. ? Please help. Thanks in Advance! 回答1: I guess this would only be possible if You create an options for size x

How to get current category id - OpenCart

£可爱£侵袭症+ 提交于 2020-01-03 01:36:04
问题 I want to add to in header - if statement: <?php if (category = 17) { ?> <meta name="description" content="category 17 description" /> <?php } ?> <?php if (category = 18) { ?> <meta name="description" content="category 18 description" /> <?php } ?> How can i get current category id 回答1: Put this before the code in your header $category = empty($this->request->get['path']) ? 0 : (int) array_pop(explode('_', $this->request->get['path'])); Then use $category instead of just category as you have

Opencart .htaccess issue

戏子无情 提交于 2020-01-02 08:58:30
问题 I'm having similar problem My url is like name.domain.com/subdoamin/store/index.php?... and my htaccess file is : Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "\.tpl"> Order deny,allow Deny from all </FilesMatch> #<FilesMatch "\.ini"> #Order deny,allow #Deny from all #</files> # SEO URL Settings RewriteEngine On RewriteBase /store/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)\?*$

Opencart .htaccess issue

岁酱吖の 提交于 2020-01-02 08:58:15
问题 I'm having similar problem My url is like name.domain.com/subdoamin/store/index.php?... and my htaccess file is : Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "\.tpl"> Order deny,allow Deny from all </FilesMatch> #<FilesMatch "\.ini"> #Order deny,allow #Deny from all #</files> # SEO URL Settings RewriteEngine On RewriteBase /store/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)\?*$