Menu
  • HOME
  • TAGS

How to export All product with link from my SQL Opent cart

mysql,opencart

SELECT CONCAT('[URL="http://thaykinhdienthoai.com/index.php?route=product/product&product_id=', a.product_id, '"]', a.name, '[/URL]', concat(" -->","[B]",FORMAT(d.price,0),"₫","[/B]"), '[SIZE=1][COLOR=#696969][I] <-- Click tên SP để xem thêm chi tiết[/I][/COLOR][/SIZE]') as "URL", a.name as "Tên SP", c.name as "Thư Mục", a.product_id as "Mã SP" FROM oc_product_description a, oc_product_to_category b, oc_category_description c, oc_product d where a.product_id = b.product_id and b.category_id = c.category_id...

How do i tell google to not crawl a domain completly

seo,opencart,robots.txt,multistore

If you are using Apache and mod_rewrite you can add a rewrite rule to serve a different robots.txt file for xyz.com: RewriteCond %{HTTP_HOST} xyz.com$ [NC] RewriteRule ^robots.txt robots_xyz.txt [L] Then create robots_xyz.txt: User-agent: * Disallow: / ...

How to reduce opencart page load time?

opencart,page-load-time,sql-server-performance

As your page is loading all the 300 records, its very obvious that it'll take more time. So you can implement the ajax loading of products instead, you'll gain major performance benefit. Further , as per the pingdom report , your site has 0 grade for the : Leverage browser...

Redirect non-www to www adding URL query string

.htaccess,mod-rewrite,redirect,opencart

The issue is that you've put the rewrite for the domain too low down. Move it to just after the RewriteBase / and it will execute before the url rewrites do RewriteBase / # Redirect non-www to www (I have tried to move this lines but still resulting the same)...

Opencart 2x Request multiple rows data

php,module,controller,opencart

Your code is fine but the problem seems in getting the module (edit module). Make sure you have set correct url for edit link. And also check whether variable photo_image exist in url or not. The url would be like yoursite address/admin/....&photo_image=idOfmodule

Opencart - custom options based on name and type

php,opencart

Your if condition isn't correct. Try this instead: <?php if ($option['type'] == 'image' && $option['name'] == 'Select Color') { ?> The braces were not set correctly....

OpenCart 1.5: how to disable caching for SVG?

svg,opencart

You can tell the image resize function to skip images that have the svg file extension with a slight mod. Check in catalog/model/tool/image.php for the line: if ($width_orig != $width || $height_orig != $height) { and include some logic to skip files with "svg" extension: if (strtolower($extension) != 'svg' &&...

New template opencart

templates,download,opencart

Open cart templates are already set according to their versions. All you have to do is to download the template for 1.5 or 2.0 and put them in the view folder, go to super admin and select the theme. That's all. It's as easy as you like it.

user permission in open cart

opencart,user-permissions

You need to enable access to user group So login to admin panel and go to system/user/usergroup Edit the administrator, select all route and hit save. You can refer http://goo.gl/MBpxFD for more detail...

OpenCart variables in home.tpl

php,opencart

You need to look into the controller of header.tpl called header.php In there, you can find the part where categories is assigned (line 93 to 124) Paste this part into the home.php (on line 18) Now the variable categories is available....

Manual 301 redirects in Opencart

regex,apache,.htaccess,redirect,opencart

Add all your RewriteRules just after your RewriteBase / line, like this: ... RewriteBase / RewriteRule ^your-url$ /your-new-url [L,R=301] RewriteRule ^your-page$ /your-new-page [L,R=301] RewriteRule ^your-category$ /your-new-category [L,R=301] RewriteRule ^your-product$ /your-new-product [L,R=301] RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] ... So it rewrites: http://www.yoursite.com/your-url - to - http://www.yoursite.com/your-new-url etc......

opencart menu bar doesn't show items/links

opencart

Make necessary updates in your .htaccess file. Change the line : RewriteBase /subfoldername/ to RewriteBase /...

OpenCart text at login page doesnt get changed if I change lines in language files

login,opencart

language-file login.php $_['text_email1'] = 'Email Address'; $_['text_pass1'] = 'Password'; controller-file login.php $this->data['email1'] = $this->language->get('text_email1'); $this->data['pass1'] = $this->language->get('text_pass1'); Login.tpl <div class="content"> <h2><?php echo $text_login ?></h2> <b><?php echo $email1 ?></b><br /> <input type="text" name="email" value="<?php echo $email; ?>" /> <br /> <br /> <b> <?php echo $pass1 ?>...

Registration page of opencart

php,opencart

Go to catalog/controller/account/register.php (controller) and into the function validate(). Remove the unnecessary fields. Then remove the fields from your tpl. In this way, you will be able to proceed with only three fields.

Implement Google Analytics With Userid in Open Cart

javascript,php,google-analytics,opencart

Opencart uses a setting in administration where you insert your whole GA code. You can use it as well for user tracking. The only change you'd do is to add this line of JS code into that field in administration: ga('set', '&uid', #CUSTOMER_ID#); This string will be then parsed by...

states/regions not loading at checkout for guests or registration in opencart

opencart

You need to update files in checkout folder. First of all, download default Opencart 1.5.4 Source from official OpenCart site. Copy files from default source Go to default OpepnCart source catalog\view\theme\default\template\checkout\ then copy following files. guest.tpl guest_shipping.tpl payment_address.tpl payment_method.tpl shipping_address.tpl shipping_method.tpl Replace files in your site source Go to Your...

Opencart url issue

php,opencart,vqmod

You have to add the following code to the following files catalog/controller/common/header.php open above file and paste below line in index() function. $this->data['text_contact'] = sprintf($this->language->get('text_contact'); second edit the language file of header.php also....

Removing Item From Basket Opencart Custom button

php,jquery,ajax,e-commerce,opencart

Thank you to @shadyyx for his advice on what the serialised information is. Now, because the item I am wanting to remove from the cart is always the same item and I know what the product id will be, i can simply check what is stored in the session in...

Proper way to work using the real image of a product on OpenCart 2

opencart,opencart2.x

With help from members of OpenCart forum, I managed to find a functional solution (using vQmod). It is thus require to create an .xml file placed in the vqmod/xml folder and containing, for example: <?xml version="1.0" encoding="utf-8"?> <modification> <id>Recover Real Image</id> <version></version> <vqmver></vqmver> <author></author> <email></email> <website></website> <file name="catalog/controller/product/product.php"> <operation> <search...

Open cart 2.0, in WAMP the basic ui is not visibile to the other pc

wamp,opencart

Go to your config.php files (both in the root and in /admin) and change all the URLs from (probably) http://localhost/ to the IP e.g. http://192.168.1.123/ Note: you will need to use the IP when browsing from BOTH PCs in future. That's probably the simplest solution. Depending on your WAMP setup,...

Opencart category module > display second child [duplicate]

php,oop,filtering,opencart

You have to customize 2 files. catalog/controller/module/category.php - 39 line Find "foreach ($children as $child) {" and put following code below it. $children_data_2 = array(); $children_2 = $this->model_catalog_category->getCategories($child['category_id']); foreach ($children_2 as $child_2) { $filter_data = array( 'filter_category_id' => $child_2['category_id'], 'filter_sub_category' => true ); $children_data_2[] = array( 'category_id' => $child_2['category_id'], 'name'...

Reading a HttpRequest post data on OpenCart

php,opencart

Looks like opencart's request class wraps php's globals. These only get populated when regular form data is submitted. To access json, you need to use the lower level input stream: public function createProduct() { print_r(json_decode(file_get_contents('php://input'), true)); } ...

Is it ok to mix storage engines on same database?

mysql,opencart,collation,mariadb,storage-engines

Its OK if you know what you're doing and why you are doing it. Different engines use memory and disk storage very differently. For an OLTP type system InnoDB is usually more sensible than MyISAM (did you check the contention before trying a different engine?). But any memory you add...

How can I change the link?

opencart

This is possible but is going to need a lot of work. You're going to have to rewrite all of the links throughout the store to use urun/urun as the route and koda as the product_id value. You're then going to have to create a new folder in the controllers...

what happening for this line $this->config->get('config_customer_price')

opencart

There's an option in the System / Settings page, under the Option tab, and Account section, which is: Login Display Prices: Only show prices when a customer is logged in. So, that part of the code is just checking the following: If this option is set and the customer is...

opencart show a blankpage when a customer login

opencart

i fixed my problem the problem is the my theme persian language first reuploaded pesian language and doesn't fix my problem then i edit only account>login language file and everything works correctly the problem is related only to language files

Image background in opencart

php,html,css,opencart

in "catalog/view/theme/yourtheme/stylesheet/stylesheet.css" body { background: #ffffff url('../image/your_background.jpg'); ...

what is the requirement of oc_category_path table exists in opencart?

path,opencart,category

The category_path table stores data relating to the category hierarchy. For instance, suppose you have top level category "Shoes" with category_id 7. "Shoes" has a sub category called "Gators" with category_id 11. In the admin panel you would see something like: Shoes > Gators The category_path table would have rows...

Server error! error 500 for .htaccess file

php,apache,.htaccess,mod-rewrite,opencart

[Mon Mar 09 23:08:08.289609 2015] [core:alert] [pid 4856:tid 1668] [client ::1:53855] C:/xampp/htdocs/shop/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration This means you don't have mod_expires loaded. You need to uncomment out that line in the httpd.conf or use a2enmod if...

How to repopulate the form data after form validation error in opencart?

drupal,yii,opencart

//Error to show in the tpl if (isset($this->error['city'])) { $this->data['error_city'] = $this->error['city']; } else { $this->data['error_city'] = ''; } //To show the other text value in the form if (isset($this->request->post['city'])) { $this->data['city'] = $this->request->post['city']; }elseif (isset($this->request->get['id'])) { $this->data['city'] = $order_details['city']; }else { $this->data['city'] = ''; } you have add this...

Error in my open-cart website

php,opencart

As the error said, you have in ´G:\PleskVhosts\mydomain.com\marketplace.mydomain.com\catalog\controller\module\category_product_slider.php on line 79Notice: Undefined index: name in G:\PleskVhosts\mydomain.com\marketplace.mydomain.com\catalog\controller\module\category_product_slider.php´ on line 139, something like: if($_GET[´name´]) ...... but you have to check first if it is set with: if(isset($_GET[´name´])) ..... If this not work, maybe you can post that particular line so i we...

Warning: Shipping method required - OpenCart

php,opencart,shipping

This is almost certainly going to be due to your model file for your shipping method. Make sure that you've given the new method code for the items. For example, the original shipping method would use flat.flat which if you view the HTML for the radio on your site you'll...

Modify open cart controller without losing it after an upgrade?

php,opencart,upgrade

This problem is very common and is usually solved by VQMod. VQMod is a PHP script that makes changes "on the fly" by reading XML files. So you describe the changes you want to make using basic "search&replace" functionality into an XML file, without having to edit the original file....

Opencart exclude products or cagegory from specials page

opencart

OpenCart don't use any category id in database query to get the special products, so you have to do it from special controller, go to special.php under this location catalog/controller/product/special.php then find foreach ($results as $result) { and add this code in next line $excludeProducts = array(10, 20, 30, 14,...

Show unit of weight in product page for Opencart 2

php,opencart,opencart2.x

Try something like in default OpenCart code. Step 1 Open file catalog/controller/product/product.php Find (around line 242): $data['text_tags'] = $this->language->get('text_tags'); Add after : $data['text_weight'] = $this->language->get('text_weight'); Step 2 In the same file catalog/controller/product/product.php Find (around line 270): $data['points'] = $product_info['points']; Add after : $data['weight'] = $product_info['weight']; $tablewunit = $this->db->query("SELECT wcd.unit FROM...

OpenCart show weight units in product page 1.5.6

opencart

You can format weight with Opencart's weight class format() method like this: $this->weight->format($weight,$weight_class_id); The getProduct() method already supplies both values you need so you can easily call it from the product controller like so: $this->data['product_weight'] = $this->weight->format($product_info['weight'],$product_info['weight_class_id']); Then display $product_weight wherever you want in the tpl as you would any...

How to write my rewriterule so I can have friendly url

.htaccess,seo,rewrite,opencart,friendly-url

You can place this rule above the others and see how it works for you. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?information/information&information=9 RewriteRule .* /Livraison-Gratuite? [R=301,L] ...

Product page as homepage in Opencart

php,html5,content-management-system,opencart,home

Both of these require you to edit your /catalog/controller/common/home.php and place the code after the public function index() { line, changing 123 to your products id v1.5.x $this->redirect($this->url->link('product/product', 'product_id=123')); v2.x $this->response->redirect($this->url->link('product/product', 'product_id=123')); ...

Footer don't change Opencart

php,html,task-parallel-library,opencart,footer

Controller file : catalog/controller/common/footer.php View File : catalog/view/theme/[ default/your theme ]/template/common/footer.tpl Please confirm that you are making changes on these files. Also if you are using Opencart 2.x Go to admin > Extensions > Modifications > click on the Refresh button to rebuild modifications. Please don't edit files on modifications...

How to display class or id function in opencart 2.0 if select option value?

php,html5,opencart

Opencart 2 has jQuery included. Assuming the divs with class function1 and function2 are already hidden, you would have: $('#input-name').change(function(){ if($(this).val() == 'image') { $('.function1').show(); $('.function2').hide(); } else if($(this).val() == 'text') { $('.function2').show(); $('.function1').hide(); } }); ...

How to remove shipping Address option from registration, guest option etc in opencart greater then 2.0

opencart

Go to \catalog\view\theme\Your template\template\checkout\checkout.tpl find the below code and comment it or you can remove it <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><?php echo $text_checkout_shipping_address; ?></h4> </div> <div class="panel-collapse collapse" id="collapse-shipping-address"> <div class="panel-body"></div> </div> </div> You will find the below code in two place replace it <?php if ($shipping_required) {...

Regex to add
  • tag using OCMOD
  • regex,xml,opencart,vqmod

    The best way to do this is to use just a standard search and specify the </ul> you want to using the index in your <add> tag specifying which of them is the right one to place the content before/after. Remember that other extensions can do the same and add...

    Opencart 2 - Echo Filter ID/Description in Category View

    php,opencart

    change this tiny part in the query (SELECT GROUP_CONCAT(pf.filter_id SEPARATOR ', ') FROM " . DB_PREFIX . "product_filter pf, " . DB_PREFIX . "product p WHERE pf.product_id = p.product_id) AS filter_id to (SELECT GROUP_CONCAT(pf.filter_id SEPARATOR ', ') FROM " . DB_PREFIX . "product_filter pf WHERE pf.product_id = p.product_id GROUP BY...

    how to put opencart 2.0 customer name on header?

    opencart

    To fix this error you need to call them in the controller instead of in the template. In catalog/controller/common/header.php add the following code inside the index() function: $data['customer_firstname'] = $this->customer->getFirstName(); $data['customer_lastname'] = $this->customer->getLastName(); In catalog/view/theme/your-theme/template/common/header.tpl you can echo the first and last name: echo $customer_firstname; echo $customer_lastname; Note that it...

    Add Slider Extension in Opencart?

    opencart,opencart2.x

    There is already a slider extension exits in the admin panel. Goto Extension ->Modules -> Banner ...

    jQuery causes elements disappear

    jquery,opencart

    The problem is this piece of code in your common.js file. I have reproduced just the minimum to see the problem in JSFiddle: http://jsfiddle.net/w9p42kcj/ $('.success img, .warning img, .attention img, .information img').live('click', function() { $(this).parent().fadeOut('slow', function() { $(this).remove(); }); }); It basically listens for a click event on any image...

    How can i rename the step in opencart 2.0

    php,opencart

    If you want to rename, you will have to edit this file: catalog/language/english/checkout/checkout.php Change the values of these variables (very easy): $_['text_checkout_option'] = 'Step 1: Checkout Options'; $_['text_checkout_payment_address'] = 'Step 2: Billing Details'; $_['text_checkout_shipping_address'] = 'Step 3: Delivery Details'; $_['text_checkout_shipping_method'] = 'Step 4: Delivery Method'; $_['text_checkout_payment_method'] = 'Step 5: Payment...

    How do i return the url (without domain name) in the Opencart header?

    templates,url,header,return,opencart

    You can use $_SERVER['REQUEST_URI'] to get the current url (without domainname).

    Opencart 2 : Add currently logged admin id to oc_product table on product insert

    php,opencart,opencart2.x

    The idea is correct (at least for me, this is how I was going to do it) You can get the id of the currently logged-in admin through a call to $this->user->getId() Add this code fragment $userID = $this->user->getId() inside the addProduct function, not inside the class declaration There...

    In opencart, how to get the url of the side store

    opencart

    The url will be which you put at the creation of the store in Store Url Field checkout this tutorial. http://code.tutsplus.com/tutorials/create-a-multi-store-setup-using-opencart--cms-22261 To get all store list at controller $this->load->model('setting/store'); $results = $this->model_setting_store->getStores(); the results will contain the stores information with id, name, url...

    Insert based on conditions

    mysql,opencart,opencart2.x

    If I got it right your query must be like: INSERT INTO oc_product_option (`product_id`,`option_id`) SELECT product_id,9 FROM oc_product_option WHERE `option_id` = 6; ...

    How does free checkout work in Opencart 2?

    opencart,opencart2.x

    In OpenCart, Free Checkout payment option only show up when order total equals to zero. To enable/disable Free Checkout: /Admin => Extensions => Payments => Free Checkout Remember, it's only show up when Total = 0 To test it, try to add $0 item and select $0 shipping (or you...

    How I can make my jquery Flexslider move automatically?

    javascript,jquery,slider,opencart,flexslider

    You need to find the bit of code that initiates the flexslider - it will look something like this: $('.flexslider').flexslider(); I thought it should slide as default but if it doesn't then you need to make sure the initiation has the following setting set: $('.flexslider').flexslider({ animation: "slide", animationSpeed: 500, //...

    Where is the “clearfix” DIV in OpenCart's featured.tpl

    templates,opencart,clearfix

    Opencart 2.X is Responsive. Here column left and column right are dynamic according to module assigned. So Opencart Checks for the module and then decides the column width, ie full width or two column or 3 column and adds the class accordingly. catalog/view/javascript/common.js:33 Here you can find the script that...

    Opencart 2 - Custom shipping Methods

    php,opencart,opencart2.x

    A shipping-method consists of the following parts on your server: admin/ controller/shipping/xx.php language/english/shipping/xx.php view/template/shipping/xx.tpl catalog/ language/english/shipping/xx.php model/shipping/xx.php ...

    VQmod not working for open cart admin

    migration,opencart,server,vqmod

    For those that want the solution to this, the issue was that the config.php files were both using relative paths instead of the full paths for OpenCart's various directories. They should always be full paths, or resolved with realpath() in the config.php files themselves

    What is the proper way to use the Model in Laravel?

    php,laravel,opencart

    Repositories is a smart decision to you. But why? Basically, repositories is a 'gateway' between your application and your storage. With repositories, you'll find your 'database queries' in a single place. Let's think about the model Articles. Instead of use a static instance of Articles all the times that you...

    .htaccess redirect to subdomain only for homepage (OpenCart)

    php,.htaccess,mod-rewrite,redirect,opencart

    You can use this in your /.htaccess file: Options +FollowSymLinks RewriteEngine On # Redirect root to shop.example.com RewriteRule ^/?$ http://shop.example.com/index.php?route=information/information&information_id=14 [R,L] # Route to PHP files RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php To make the redirect permanent, change [R,L] to [R=301,L]....

    Opencart shows variable instead text

    variables,opencart

    I made a new store and works ok... Still don't know why this has happened.

    403 Error when trying to remove products from Cart

    php,server,e-commerce,opencart,cpanel

    I can see you are getting 403 forbidden error that means mod_Security is blocking your access with that URL. I will suggest you please contact your server admin and ask them to check Apache error logs of your domain. They can find exact root cause of your issues.

    OpenCart “order again” functionality in the order history

    php,opencart

    Upon investigation and posting on the OpenCart website, it turns out reorder is already a functionality in OpenCart, but we never enabled it [or someone disabled it months ago]. We had to renable it by adding a button and attributed the reorder link under /catalog/controller/account/order.php. We also added some custom...

    opencart make table of categories insted of carousel

    php,view,opencart

    You need to make some minor changes and this will work: <?php if($count % 4 == 0){?> </tr> <?php } ?> //here you need to change $count++; Give the space after <?php tag. due to this the error occurs. There is require a space after this tag. And you are...

    OpenCart - Adding a product via a link

    javascript,opencart

    This seemed to be an issue with OpenCart's built in cache system. After clicking on the link today, It worked successfully. If anyone else experience this issue in the future, do not forget to delete OpenCart's cache files.

    SQL Noob compare table in opencart

    sql,database,phpmyadmin,e-commerce,opencart

    Try this query... update oc_product set status = 1 where model in (select sku from vegan) This assumes that oc_product.model matches vegan.sku. Any vegan.sku with a matching oc_product.model will get oc_product.status set to 1....

    remove required field from opencart 2 admin when inserting new orders

    opencart,opencart2.x

    OpenCart 2.0 uses a catalog side API which is what the code above is referring to (it calls it via cURL). You can find this in /catalog/controller/api/ in the relative .php file, which in your case is order.php. This includes the validation as well as the code to call the...

    Fatal error: Call to undefined method in opencart

    php,opencart,opencart2.x

    I came to the conclusion, that the method redirect() can only be undefined, if you were using Opencart 2.x, so please ignore my comment about which version you use. In Opencart 2.0 $this->redirect() has been changed to $this->response->redirect(). So line 17 should look something like this: $this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'],...

    How to make vertical navigation bar in Opencart v2.0.1.1?

    opencart,opencart2.x

    In catalog/view/theme/default/template/common/header.tpl remove the nav id="menu" tag and all that is inside it. Then in the admin, go to System>Design>Layouts>Home and add the Category module to either Column Right or Column Left, whichever you prefer. Actually you may need to add it to every route that you want it to...

    Opencart module controller index function data source

    model-view-controller,controller,opencart

    The $this->config->get object is set initially from index.php file as a current setting and not as a module tracking. The $setting array passed into the index method is the one initialized whenever the current module is loaded at that point in the loop. The $setting object should be initialized automatically...

    vqmod throws strpos() empty needle error

    php,opencart,strpos,vqmod

    The issue is caused by the <?php ?> tags inside of the search node. Those should be escaped with <![CDATA[ ]]>: <operation> <search position="before"><![CDATA[ <?php echo $footer; ?> ]]></search> <add><![CDATA[ <?php phpinfo(); ?> ]]></add> </operation> Hope this saves someone else several minutes of time....

    Admin is showing different price to Front End

    opencart,opencart2.x

    The concept is $(USD) is default for admin panel so any amount you add on admin panel is in $(USD). in your contest $70 is for Drama Tas Individual Product which is USD Now in setting System>>Settings>>Store Name>>Local you have set $(AUD), So in front each and every amount will...

    Subquery Returns More Than 1 Row Error No: 1242 on Homepage in Opencart 1.5.6

    php,mysql,opencart

    go to phpmyadmin>yourdatabase and check all the tables. remove unwanted tables. check database engine and charset. if any table has different then set them to default charset and DB esngine. and it's done. i hv solved my problm. try it will help u in opencart....

    Opencart payment wont work, -9 simulation forbidden [closed]

    php,opencart

    I think it has something to do with the settings in your Sisow account. To make test transactions you have to allow this in your account first. From the Sisow FAQ: https://www.sisow.nl/epay-online-betaalmogelijkheden/epay-veel-gestelde-vragen Wat betekent “Simulation forbidden”? De foutmelding “simulation forbidden” betekent dat u in uw webshop heeft aangegeven dat u...

    Domain won't go to https://example.com, when example.com is typed

    php,ssl,fonts,opencart,font-awesome

    In your vhost configuration, or in your .htaccess file, add an Apache redirect rule: RewriteEngine on RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L] ...

    Direct link to language in OpenCart

    opencart,multilingual

    Nowadays opencart doesn't support this function, but in the past , older versions of Opencart did have this function. If you want to include this function in your website you will have to do the following: Edit this file: catalog/controller/module/language.php find this: class ControllerModuleLanguage extends Controller { protected function index()...

    $this->config->get('something') in opencart

    php,oop,web,opencart,opencart2.x

    <OC_ROOT>/system/library/config.php What do you mean by simple query? if SELECT <COLUMN[S]> FROM <TABLE> WHERE <CONDITION[S]> is simple for you, then yes Too broad for answering here. Check the code for how the administration settings are handled, or settings from certain extensions/modules and You'll see. Basically if you insert some...

    Opencart search page custom product link structure

    php,opencart

    I wrote a function for this a while back and you are free to use it. The only problem arises when a product belongs to more than one category, in which case the function chooses the deepest level category to generate full path. If more than one exists at the...

    Opencart 2.0 How to duplicate filters?

    filter,opencart,colorfilter

    The product color should be a product attribute, or an option, not a category. Then you can filter by attribute/option. You will likely need an extension to offer attribute or option filtering. The color would be a product option if it is something that would not be a default variation...

    How to save a form on button submit in php

    php,opencart

    Just make sure that form is submitted, like this: if (!empty($_POST)) { if ($this->validate()) { $this->model_catalog_contactus->saveContact($this->request->post); } } ...

    Check module position in OpenCart 2.0

    php,opencart,opencart2.x

    I have found simple solution. This is working like charm. Step 1 in .tpl file. (You want to that module. featured.tpl etc...) <?php if ($module['position'] == 'content_bottom' || $module['position'] == 'content_top') { ?> //add your code Here <?php } ?> Step 2 add in .php file (You want to that...

    opencart sort order for only a specific category

    php,sorting,opencart,product

    If you truly want to hard code this in to the controller, which is not something I would recommend, you can simply set the default sort depending on category. One way to do it would be create an array with settings and refer to it in the logic: $categorySorts =...

    Opencart www and without www

    php,.htaccess,opencart

    Try to edit your config URL to match the following Public Config // HTTP define('HTTP_SERVER', 'http://www.quickee.lk/'); // HTTPS define('HTTPS_SERVER', 'https://www.quickee.lk/'); Admin Config // HTTP define('HTTP_SERVER', 'http://www.quickee.lk/admin/'); define('HTTP_CATALOG', 'http://www.quickee.lk/'); // HTTPS define('HTTPS_SERVER', 'https://www.quickee.lk/admin/'); define('HTTPS_CATALOG', 'https://www.quickee.lk/'); ...

    how to add extra tab without any extension in product page in opencart

    opencart

    Add a link to div id="tabs" with a href to your custom tab's id <div class="tabs-group"> <div id="tabs" class="htabs clearfix"> <a href="#tab-description">Delivery </a> <a href="#tab-my-tab">My Tab</a> //Your custom tab .... Then add your tab div after <div id="tab-description" class="tab-content"><?php echo $description; ?></div> <div id="tab-my-tab" class="tab-content">Your html content goes here</div> ...

    How to disable some criteria for product sort order in OpenCart?

    sorting,opencart

    I didn’t find any tool in administrative panel, so in order to disable sort by "Default" I had to do it programmatically in following way: in file /admin/catalog/controller/product/category.php /*$data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' $url) );*/ in file /admin/catalog/language/english/product/category.php...

    bug when I .load in opencart

    javascript,php,html,opencart

    I'm almost positive that your problem is due to the fact that you have used the id "cart" in your checkout/cart template which is already in use by the cart module handled by module/cart. It's important to understand that these are two different things and the cart id needs be...

    Password Encryption Using opencart database for sitewide login

    php,encryption,opencart

    Actually Opencart supports both schemes so you should be fine just using the md5 hashed password in the customer table. In this case you can simply leave the salt blank. As a point of reference, take a look at this query used in the login() method in system/library/customer.php which is...

    OpenCart outgoing email fails DMARC Evaluation

    email,joomla,opencart,dmarc

    I got this to work!! If anyone else is running into this issue or something simular, here is what I found. Using Mail or SMTP for the Mail Protocol made no difference that I could see. I went with Mail since that is what OpenCart recommeneded. I used the -F...

    OpenCart 2.0 I can't add modules (ControllerModuleMinicart::redirect() error)

    php,opencart,opencart2.x

    Change $this->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')); to $this->response->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));...

    With what order does OpenCart executes vQmod xml files?

    opencart,vqmod

    vQmod loads and executes the xml files in alphabetical order. So for your example /vqmod/xml/mymod1.xml will be loaded and executed first, followed by /vqmod/xml/mymod2.xml

    Opencart localhost site redirects to live site

    php,apache,.htaccess,localhost,opencart

    The main culprit was a script on header.tpl file C:\xampp\htdocs\mytestsite\catalog\view\theme\lexus_megashop\template\common I found this script and just removed it and redirection stopped. <script async type="text/javascript" > var strUrl = location.href; if(strUrl.indexOf("www") == -1){ location.href = "http://www.testsite.com"; } </script> ...

    Opencart Category - Product Layout Issue

    php,css,opencart

    Wrap your col-sm-3 (in group of four) in separate rows (divs with class row) markup should look like <div class ="row"> <div class ="col-sm-3">...</div> <div class ="col-sm-3">...</div> <div class ="col-sm-3">...</div> <div class ="col-sm-3">...</div> </div> <div class ="row"> <div class ="col-sm-3">...</div> <div class ="col-sm-3">...</div> <div class ="col-sm-3">...</div> <div class ="col-sm-3">...</div> </div>...

    Displaying Label in opencart based on Category

    php,opencart

    you need to add that piece of code if($category_id==977){$bogo = true;}else{$bogo = false;} $this->data['products'][]= array('bogo' => $bogo, to controller/product/search.php => [email protected] BTW: you will need the add the above code in every controller file that makes use of product/product_collection.tpl...

    Last child of breadcrumb font set to bold in opencart 2.0

    opencart

    <div class="breadcrumb"> <?php $count = count($breadcrumbs);?> <?php $i=0; ?> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?> <?php if( $i == $count-1){ ?> <?php echo '<b>'.$breadcrumb['text'].'</b>'; ?> <?php }else{ ?> <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> <?php $i++; ?> <?php } ?>...

    Missing icons in my opencart shop

    image,.htaccess,icons,opencart

    Please refer this link : http://forum.opencart.com/viewtopic.php?f=20&t=21166 Users having issue with https , images not showing on https pages. So as a solution you can try opposite trick they have done. Check your config.php file for the values of HTTP_SERVER and HTTPS_SERVER constants. Make sure that you have correct values set....

    add custom header for checkout page in opencart

    php,opencart

    Don't make any changes to the header.tpl file. Instead write your custom code into checkout.tpl file in the template/checkout folder. Replace the $header with your code.

    How can I disable currency autoupdate in Opencart?

    php,opencart

    The setting is stored in the oc_setting table. This should disable it: UPDATE `oc_setting` SET `value` = 0 WHERE `key` = 'config_currency_auto'; You can reenable it by changing it back to 1, or in System->Settings->Local However, disabling it is not recommended and the error suggests a bigger issue, possibly a...

    How to add total cart weight to invoice in opencart?

    php,opencart,invoice

    You are using vqmod? Search in the file admin/view/template/sale/order_invoice.tpl for <?php foreach ($order['voucher'] as $voucher) { ?>. Set the position to before and add: <tr> <td align="right" colspan="4"><b>Total Weight:</b></td> <td align="right"><?php $total_weight = 0; foreach($order['product'] as $product) { $total_weight += $product['weight']; } echo $total_weight; ?></td> <td> </td> </tr> This will...