opencart

nusoap implementation for opencart

两盒软妹~` 提交于 2019-12-11 06:23:41
问题 Hope that someone is familiar with OpenCart here. I have problem with my Nusoap implementation on OpenCart. This is my implementation I created a new library file called ws.php (I have the entire nusoap folder in system/library/) <?php final class Ws { public function __construct() { require_once('nusoap/nusoap.php'); } } ?> I created a controller file in catalog/controller/webservice/ws.php <?php class ControllerWebserviceWs extends Controller { private $error = array(); function __construct

randomize default products in opencart

Deadly 提交于 2019-12-11 05:45:34
问题 I'm using OpenCart V1.5.3.1 and am trying to randomize or shuffle the products per category on page load. The other sort options should still work though (per price, rating, alphabetical,..). Anybody that can give me some pointers? Many thanks, Steven Code I've tried: In controller/catalog/product/category.php Just below $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity

Disable image cache in OpenCart

喜你入骨 提交于 2019-12-11 05:19:49
问题 I am currently developing an iPad/tablet optimized template of OpenCart. I have stumbled upon a problem here, all images I am wanting to use are all cached and resized images, and on the iPad template I want the original resolution images to be displayed, especially the main image. Is there a way I can get the template to show the original uploaded images instead of the resized images? If someone can point me into the right direction I will develop a vqMod for it (as I still want to use the

htaccess mod_rewrite for Opencart search page URLs

旧街凉风 提交于 2019-12-11 04:54:39
问题 I'm having some difficulty creating an htaccess mod_rewrite rule which would take the following URL: http://www.mydomain.com/index.php?route=product/search&filter_name=SEARCH%20CRITERIA and make it something more along the lines of: http://www.mydomain.com/search/SEARCH-CRITERIA or even http://www.mydomain.com/search?filter_name=SEARCH%20CRITERIA Everything I've tried seems to break the SEO-friendly URLs that are auto-generated by the Opencart framework. How can this be done? 回答1: In Your

How to add product options in category page in opencart 2.0

ぃ、小莉子 提交于 2019-12-11 03:46:31
问题 I want to add product options in the category page in opencart 2.0. I have added this code in \catalog\model\catalog\product.php public function hasOptionPriceIncrease($product_id) { $option_data = $this->getProductOptions($product_id); if (is_array($product_option_value)) { foreach ($product_option_value as $option) { if (is_array($option['product_option_value'])) { foreach ($option['product_option_value'] as $value) { if ($value['price'] > 1) { return true; } } } } return false } and then

Get the store ID for multi store setup with opencart

浪子不回头ぞ 提交于 2019-12-11 03:19:53
问题 We have a multi-store set up and I wanted to change the template slightly for each store. I had a good look through the code already in place and found these: $this->config->get('config_store_id') $this->load->model('setting/store'); $results = $this->model_setting_store->getStores(); $this->model_setting_setting->getSetting('config', $order_info['store_id']); The first line only ever returns the default store ID. I would want this to work even if we have not order details. What is the most

html_entity_decode for twig (opencart)

泄露秘密 提交于 2019-12-11 03:09:53
问题 im trying to output an attribute of a product on my product page (opencart v3). The attribute is called 'technicaldetails' and it works just fine using this code: {% if attribute_groups %} {% for attribute_group in attribute_groups %} {% if attribute_group.name == 'technicaldetails' %} {% for attribute in attribute_group.attribute %} {{ attribute.text }} {% endfor %} {% endif %} {% endfor %} {% endif %} but the technical details field have unstyled list stored in it.. and this outputs the

Display errors OpenCart

谁都会走 提交于 2019-12-11 00:51:39
问题 In PrestaShop I can display the errors with the function Tools::displayError() like this: if (empty($email)) { $this->errors[] = Tools::displayError('Email is empty.'); $this->doLog('ERROR: Email/username is empty'); } elseif (!Validate::isEmail($email)) { $this->errors[] = Tools::displayError('Invalid email address.'); $this->doLog('ERROR: Invalid Email address'); } Is there a similar way to do this in OpenCart? Is there a function i can use? Thanks 回答1: To Turn on error reporting, please

How to add Telephone field in OpenCart 2.0.2.0 contact form

為{幸葍}努か 提交于 2019-12-11 00:28:30
问题 How can I add extra input fields in OpenCart contact form (under information)? Specially I want to add a telephone number field in my contact form and I've followed a tutorial but it didn't work for me. Is there any alternative? 回答1: I know it's possible that you already resolved this issue, but this is for those who still want to add custom field to contact form. In OpenCart 2.0 default Contact Us page (/index.php?route=information/contact) - Contact Form has only 3 fields: Your Name, E-Mail

How to connect opencart with mssql server

你说的曾经没有我的故事 提交于 2019-12-10 22:23:11
问题 Is there any chance of connecting opencart with mssql? Have anyone tried? If so what is the procedure of doing that? 回答1: That should not be a big problem, You only need to do: create /system/database/mssql.php class - the class should have the same methods, properties and functionality as e.g. the mysql.php one rewrite all of the model classes method's queries to meet the MS SQL / T-SQL SQL syntax in both config files ( /config.php and /admin/config.php ) set the proper DB_DRIVER - mssql I