opencart

URL Rewriting OpenCart Products SEO

Deadly 提交于 2019-12-08 16:04:21
问题 I'd like to like to rewrite my product url's from my opencart webshop. Opencart itself has a seo implementation which really sucks. I've updated the seo implementation to be able to use the same keyword for multiple categories see: Opencart duplicate URL keywords But this is only working for the categories. For the products i'd just need a htaccess rewrite rule i think. The original url looks like this: http://domain.com/index.php?route=product/product&path=25_28_93&product_id=1759 my url

Use front side model function from admin side

折月煮酒 提交于 2019-12-08 13:19:06
问题 I'm working on opencart Version 1.5.1.3 . At one stage i want to use front side model function in the admin side controller file. Can anyone please help me.? It would be appreciated. 回答1: I know it's late but maybe useful for future works. Simply you can add a function to your /system/engine/loader.php . But you may know doing this directly may harm you in the future. So do it through vqmod . I'll tell you how: <?xml version="1.0" encoding="UTF-8"?> <modification> <id>Loadin Catalog Models<

how to set HTTP only flag in XAMPP

醉酒当歌 提交于 2019-12-08 13:17:14
问题 I want to set HTTP only flag in xampp v3.2.2 i have installed opencart v 2.3.0.2 on xampp and enable it in every php.ini but still not working you can also see this for more information here 回答1: session.httponly option can be enabled by php.ini. To verify that it is working you will need to run: phpinfo(); if the option is not there or set properly, then you are editing the wrong php.ini file. 回答2: For XAMPP on Ubuntu edit the file php.ini /opt/lampp/etc/php.ini session.cookie_httponly=On

get third level category in opencart 2

泄露秘密 提交于 2019-12-08 12:58:12
问题 Im editing template for 2.0.x open cart, and found out that the Menu one the top side - shows only upto second sub category.. and i'v been looking up controller files, template files, to edit it as I want - show just one more level (or all levels..as long as I can get more deeper level of sub sub cats..) of sub categories on the navigation on the left --- for couple weeks..and could not find the way. header.tpl <ul> <?php foreach ($categories as $category_1) { ?> <li class="sub-menu"><a href=

upload image file through ajax and php

余生颓废 提交于 2019-12-08 11:35:42
问题 I am not familiar with this problem I am facing.. I would like to upload image file through ajax & php so far I have done these: HTML: <input type="file" name="file" id="file" class="inputfile"> <label for="file">Choose a file</label> ajax: jQuery(document).ready(function($) { var data = { business_name: $('#business_name').val(), business_country: $('#business-country').val(), business_region: $('#business-region').val(), business_phone: $('#business_phone').val(), //business_image: $('

Dynamically adding new properties in php?

人盡茶涼 提交于 2019-12-08 08:10:15
问题 I've recently read the opencart source code,finding this code that seems odd to me class Customer { private $customer_id; private $firstname; private $lastname; private $email; private $telephone; private $fax; private $newsletter; private $customer_group_id; private $address_id; public function __construct($registry) { $this->config = $registry->get('config');//no config property in the class $this->db = $registry->get('db');//no db property in the class How is it possible to use $this->

opencart to show category for each product in search results page

不问归期 提交于 2019-12-08 06:07:13
问题 I am using Opencart 2.2.0 and I am trying to show category for each product on search page. So far, I have my controller like this: <?php class ControllerProductSearch extends Controller { public function index() { $this->load->language('product/search'); $this->load->model('catalog/category'); $this->load->model('catalog/product'); $this->load->model('tool/image'); if (isset($this->request->get['search'])) { $search = $this->request->get['search']; } else { $search = ''; } if (isset($this-

Opencart: Query the database to get tax_rate data

我怕爱的太早我们不能终老 提交于 2019-12-08 05:11:35
问题 I'm trying to get a calculator helper in product admin page, near the price input I want to add a textbox that helps users to calculate the price with Tax VAT exluded to insert. It's something similar to this PLUGIN but I need to query the database to get an array of all Tax Rates and compare them with the tax_class_id selected by user just below the price. I have found a sort of request in this page: admin/controller/localisation/tax_rate.php if (isset($this->request->post['rate'])) { $this-

Remove index.php?route= from OpenCart

馋奶兔 提交于 2019-12-08 04:25:34
问题 I'm a .NET developer but my friend called me for support.I made some changes with .htaccess but i'm corrupted SEO. Everything started with "www" tag on url.I see we get some errors when we are not using "www" and i'm changed .htaccess.I'm added rewrite rule and redirected mysite.com to www.mysite.com.Our problems are solved but now we have another problem. We are using Opencart - SEO and it's enabled.Our products seems like http://www.mysite.com/epson-claria-uyumlu-yazici-kartus-dolum

vqmod wildcard search using regex

断了今生、忘了曾经 提交于 2019-12-08 01:57:01
问题 As an example here I am trying to replace all $this->load->model(*); , the * represents a wildcard search/replace. What is the correct way to do this in a regex? <operation> <search regex="true" position="replace"><![CDATA[ $this->load->model(.*); ]]></search> <add><![CDATA[ $this->load->model('catalog/information'); ]]></add> </operation> 回答1: The escaping required should be pretty minimal. You only need to escape the $ and the parentheses like so <search regex="true" position="replace"><!