FAQ Database Discussion Community


Opencart exclude products or cagegory from specials page

opencart
I'm trying to exclude some products from specials page, because I have the a product "day dress product x" and "evening dress product x" it's the same product but different categories... And they are next to each other .. 2 products that looks the same only the name difference, so...

what is the requirement of oc_category_path table exists in opencart?

path,opencart,category
I am unable to understand the concept of having category_path table in opencart. Can any opencart expert here explain with a scenario/example?

Opencart shows variable instead text

variables,opencart
my store suddenly starts to show just the variables, instead the text of the variable. i already check the controller, and it looks okay. the footer shows like this: text_address text_address_cnt and the content of theses variables is $_['text_address'] = 'Endereço'; $_['text_address_cnt'] = 'Endereço da sua loja'; the controller looks...

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

php,mysql,opencart
I am getting this error on home page while i am inserting any product from admin. but if i update the same product there was no error on home page. My project is on opencart 1.5.6 Warning: mysql_query(): Unable to save result set in /home4/hathberr/public_html/sdfabrics.com/system/database/mysql.php on line 22Notice: Error: Subquery...

Last child of breadcrumb font set to bold in opencart 2.0

opencart
In opencart 2.0.x on category page last child of breadcrumb text font is need to set as a bold. Any one please help me. Thanks...

Opencart url issue

php,opencart,vqmod
Here is my site http://goo.gl/Tsnqzr OC. 1.5.4. There is contact url in green horizontal menu. I added it myself in header.tpl: <li><a href="http://italimporter.com/index.php?route=information/contact">Contact</a></li> But I can't translate it in this case. So I want change this link, as it is the footer. Second column from the left, first link from...

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

php,ssl,fonts,opencart,font-awesome
I'm using an OpenCart 2 theme and my PHP skills aren't great. My problem: When I type example.com in, the SSL lock isn't displayed and my Font Awesome fonts do not display. So the shopping cart icon just shows as a blank square. However, if I click example.com's logo or...

How to add total cart weight to invoice in opencart?

php,opencart,invoice
i am developing an ecommerce website on opencart 1.5.6. site is almost ready but i stuck on 1 point. for example i have 4 product in my cart with weight 100gram each. I already add the weight column in invoice for each product. but now i want to show the...

Direct link to language in OpenCart

opencart,multilingual
I have a website(built with OpenCart) with multiple languages, e.g. English, German, French. Users can change language using default functionality of the OpenCart - clicking on language icons on top. Is it possible to send users automaticaly (so they don't have to click on the flag) from : Germany to...

OpenCart - Adding a product via a link

javascript,opencart
I am currently using OpenCart and would like to replace their 'Add to Cart' button with a simple link that says add to cart but I am currently running into a few problems. Currently, OpenCart uses javascript to add products to the cart using a button: <button type="button" onclick="cart.add('41');"><i class=""></i>...

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

templates,opencart,clearfix
I am trying to locate the "clearfix" DIV in OpenCart's "featured.tpl", which is inserted in the live site but is not present in the actual template file. In the latest version of OpenCart, 2.0.2.0, and probably in older versions, for a reason I don't fathom, an extra DIV is inserted...

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

php,opencart,opencart2.x
I'm trying to add modules to the latest OpenCart version and so far no one worked. First I'm trying to add side cart, I found couple modules, but all of them are for earler versions and doesn't work with 2.0, also I tried to add facebook like box extension and...

403 Error when trying to remove products from Cart

php,server,e-commerce,opencart,cpanel
I am using a cPanel host and running PHP 5.5. Opencart version 1.5.1. When I try to remove a product from the cart I am getting a 403 forbidden error. This only seems to happen with products that have a lot of options and include text input options. I have...

Password Encryption Using opencart database for sitewide login

php,encryption,opencart
Hello hopefully I can be pointed in the right direction and gain some clarity as I am now confused. I have a website that also has opencart (Version 1.5.6.1) attached the two are styled to look the same. I have come to a point where I need users to log...

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

opencart
im having a Opencart 1.5.4 installed... there is this problem where the users/guests are unable to register at the checkout because the states are not being populated based on the country... when a user registers at the register page it works but not at the checkout.. Below is the JS...

Opencart 2 - Echo Filter ID/Description in Category View

php,opencart
I'm working on a Opencart 2 - Project and need to echo the Filter IDs for each Product seperatly in Category View (e.g. as additional Classes for the Product-Thumbs, to apply different Styles to vegan/vegetarian food). I've been breaking my fingers for hours now, modyfing the Controller-, Model-, and View-Files,...

opencart show a blankpage when a customer login

opencart
i,m using Opencart 1.5.6.1 for my store everything is good, but when a customer register and then click the submit button OR when a customer want to login to own profile the page show blank when the page is blank my URL is : www.mysite.com/index.php?route=account/login Note: when blank page is...

Redirect non-www to www adding URL query string

.htaccess,mod-rewrite,redirect,opencart
I use SEO URL on my opencart using .htaccess, now I want to redirect all non-www URL access to URL with www. So I add these lines in my .htaccess file: RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Yes now the URL is always redirected to www if it is...

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

php,laravel,opencart
Can you help me with this? I am currently studying Laravel on my own and I followed the tutorials in the Laracasts and it is awesome. Before Laravel I am using CodeIgniter and Opencart in my projects and I started to study Laravel because I want to learn a new...

New template opencart

templates,download,opencart
I already have too website with opencart, the first one with opencart 1.5.5.1 et the second one with opencart 2.0.2.0. I don't know really how it works, some people put it for me for the two first website. I want to buy a new template opencart for a new website,...

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

sorting,opencart
By default there are: Default Name (A-Z) ... Model (A-Z) Model (Z-A) I want disable Default and few others. Is there any tool in administrative panel to do that or do I need to do it programmatically?...

How can I disable currency autoupdate in Opencart?

php,opencart
Opencart version: 1.5.6.4 I have a fresh opencart installation, in a shared hosting environment. Everything runs smoothly until I try to log in into the admin account. I get the following error: Fatal error: Uncaught exception 'ErrorException' with message 'Error: MySQL server has gone away<br />Error No: 2006<br />UPDATE oc_currency...

Error in my open-cart website

php,opencart
I have an open-cart 1.5.6.4 in which have installed Eclipse - Premium Responsive Open-cart Theme on it.Its working fine.But when I completed the theme installation.I got an error at the top of store front page or home page of my website.Error is like this: Notice: Undefined index: name in G:\PleskVhosts\mydomain.com\marketplace.mydomain.com\catalog\controller\module\category_product_slider.php...

Regex to add
  • tag using OCMOD
  • regex,xml,opencart,vqmod
    I want to add a menu in opencart admin page using OCMOD. I want to modify the menu in menu.tpl file but I think it requires regex as the <li> must be the last before </ul> tag. Can somebody help? The <ul> tag is like this: <ul> <li><a href="<?php echo...

    Insert based on conditions

    mysql,opencart,opencart2.x
    I am trying to insert some data in mysql table. I have an option in opencart with option_id = 6, I want to insert into all products containing option_id=6 a new option with option_id=9. insert into oc_product_option (`option_id`) select 9 where (SELECT `option_id` FROM oc_product_option WHERE `option_id` == 6); is...

    Server error! error 500 for .htaccess file

    php,apache,.htaccess,mod-rewrite,opencart
    I work with Opencart shopping system And have This .htaccess File: # STARTNITRO RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}] ExpiresActive On #CSS JS XML TXT - 1 WEEK <FilesMatch "\.(xml|txt|css|js)$"> Header set Cache-Control "max-age=604800, public" ExpiresDefault "access plus 1 week" </FilesMatch> #JPG JPEG PNG GIF SWF SVG - 1 MONTH <FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$">...

    How do i tell google to not crawl a domain completly

    seo,opencart,robots.txt,multistore
    I have a site in opencart say abc.com and i have opened a multi store with it xyz.com and i have found that google has started crawling xyz.com too which i don't want . Both the domains are pointing to the same directory so i suppose there can only be...

    How to reduce opencart page load time?

    opencart,page-load-time,sql-server-performance
    My opencart products page is taking too much time to load, I tried to optimize query and database but it didn't work for me. I tested my page from pingdom page test. It takes more than 15 sec. I query fetch more than 300 records this might be a reason,...

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

    opencart,opencart2.x
    I'm currently looking for the proper way to work on a theme using the real image of a product and not its thumbnail (identified as $thumb in the default theme). I have found a abrupt trick by adding a line in the controller file: $this->data['cover'] = $product_info['image']; But does anybody...

    How I can make my jquery Flexslider move automatically?

    javascript,jquery,slider,opencart,flexslider
    I am having trouble with the built-in slider in this theme: Eda Opencart Theme I relised after purchase that it doesn't move automatically. Is there a way to change the javasript code to make it move eevry, let's say 4 seconds? That's the code: /* * jQuery FlexSlider v2.2.0 *...

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

    opencart
    I am looking to remove shipping Address or delivery address option from registration, guest in opencart 2.0 and above version but shiping method should be there because i want billing address to be the shipping address without extra field I tried to implement by these two tutorials in my opencart...

    Opencart 2.0 How to duplicate filters?

    filter,opencart,colorfilter
    We are creating filters on Opencart 2.0. We gonna create the "color" filter, but the problem is that this filter will go on every category. Do we have to put this filter manually in each category or is there any way to duplicate filter or to applicate it directly to...

    Add Slider Extension in Opencart?

    opencart,opencart2.x
    I am Creating a Opencart Page with 1500 products. In homepage I want Slider Extension For Products With Time interval. . How can i Add the extension . . Help me Out Here. . For Extension Code.....

    OpenCart variables in home.tpl

    php,opencart
    So i'm trying to display the categories on the homepage in a custom theme of OpenCart. In the header.tpl you can use variables as $categories and so fort, but when I want to use these variables in the home.tpl file, it says it doesn't exists. Is there any way to...

    How can I change the link?

    opencart
    I'm using OpenCart v1.5.6.3 Question: How can I change the link? I don't want to SEO for link. I want to change the names in the link. Example: Original OpenCart Link: index.php?route=product/product&product_id=46 I want to: index.php?rota=urun/urun&kodu=46 Can we change it? Is it possible? Thanks....

    user permission in open cart

    opencart,user-permissions
    I have downloaded the open cart point of sale module. I am able to install it in my application, but unable to open the module due to a user permission issue. I am logged in with super admin role, but still unable to use it. For which file and where...

    OpenCart show weight units in product page 1.5.6

    opencart
    guys.. How can i show the the weight (with units) in product page in 1.5.6. Example: Weight - 2.5 kg; Weight - 250 mg ... I've been reading some articles, but nothing working correctly. Thanks!...

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

    opencart,opencart2.x
    I am using Opencart V2.0.1.1. Please suggest how to change the default Opencart navigation bar(Horizontal) to the Vertical. With Sub-Categories popping in right side.

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

    opencart
    I created another store in opencart, how can I get the url of the other store in controller? Thanks,Ron...

    Admin is showing different price to Front End

    opencart,opencart2.x
    I have set up an OpenCart store for my Australian company. In System>>Localisation>>Currencies I created a new Currency for Australian Dollars with the code AUD. Then in System>>Settings>>Store Name>>Local I set the Country to Australia and the Currency to AU Dollar: But when I add a new product and set...

    Fatal error: Call to undefined method in opencart

    php,opencart,opencart2.x
    When i am trying to save a module details, it shows the below error, i don't know what is the mistake over there, but the data's are stored but every time i try to save i get this error. ERROR Fatal error: Call to undefined method ControllerPaymentIcicipg::redirect() in C:\xampp\htdocs\usa\admin\controller\payment\icicipg.php on...

    Footer don't change Opencart

    php,html,task-parallel-library,opencart,footer
    I am trying to edit the footer of my store. But nothing seems to happen. I have to add one more div in the content but it doesn't display on the store, neither the css. <div class="payment col-sm-12"> <div class="container"> <div class="row"> <p> <?php echo $text_payment; ?> </p> </div> </div>...

    Modify open cart controller without losing it after an upgrade?

    php,opencart,upgrade
    I'm new to opencart and I had to modify a controller in order to show a list of featured products on the site's header. The change was very easy, however I think I have to worry about losing the controller's modification if I update open cart. My question is, what's...

    Opencart 2 - Custom shipping Methods

    php,opencart,opencart2.x
    I was wondering whrere the shipping methods are set up in Opencart 2 - not in the Admin-Panel, but on the server and database. I would like to set up my own (stub-) shipping method without the use of Extensions - maybe by cloning and customizing an existing one, but...

    opencart sort order for only a specific category

    php,sorting,opencart,product
    I have the default sort order for all categories by price low-high (p.date_added ASC) but for a specific category example "new products" I want the sort to be p.date_added DESC. In `catalog/controller/product/category.php I have: <?php class ControllerProductCategory extends Controller { public function index() { $this->language->load('product/category'); $this->load->model('catalog/category'); $this->load->model('catalog/product'); $this->load->model('tool/image'); if (isset($this->request->get['filter']))...

    Product page as homepage in Opencart

    php,html5,content-management-system,opencart,home
    I have only one product on my opencart and I want this product just to be in the homepage so that the customer will no longer go to any page just to buy the product. How can I make this product as default homepage? or How can I make the...

    Opencart module controller index function data source

    model-view-controller,controller,opencart
    Some module controllers on a website I work with have data passed to their index function. How is it done? I can't find the source file that sends data to controller.

    vqmod throws strpos() empty needle error

    php,opencart,strpos,vqmod
    vQmod throws the following error when parsing an XML file: Warning: strpos(): Empty needle in /home/public_html/vqmod/vqmod.php on line 455 Here's the XML itself: <operation> <search position="before"> <?php echo $footer; ?> </search> <add><![CDATA[ <?php phpinfo(); ?> ]]></add> </operation> XML file looks ok, all paths are correct. Didn't find anything relevant on...

    VQmod not working for open cart admin

    migration,opencart,server,vqmod
    I am having the most frustrating issue with VQmod. I moved my OpenCart store from a Godaddy VPS to Rackspace's Cloud Sites. The move went fine and everything works properly except the VQmod's on the admin panel. None of them load. No errors in the log files, no admin cache...

    Show unit of weight in product page for Opencart 2

    php,opencart,opencart2.x
    Hi! How to display the unit of weight (kg., gr., oz., ml.,) in product page in Opencart 2.0.2.0 Now only displays a number without units. I'm Using the default template in file template\product\product.tpl it looks like this: ...<li><?php echo $text_model; ?> <?php echo $model; ?></li> <?php if ($weight) { ?>...

    Reading a HttpRequest post data on OpenCart

    php,opencart
    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);...

    How does free checkout work in Opencart 2?

    opencart,opencart2.x
    I am trying to make a development site where I can add products to my cart and delivery options - and then checkout. I want to be able to do dummy orders without using real cards or payment gateways I have enabled free checkout but it does not appear on...

    How to write my rewriterule so I can have friendly url

    .htaccess,seo,rewrite,opencart,friendly-url
    My SEO expert asked me to do HTTP 301 redirect to a friendly URL in an Opencart installation. This Opencart installation use SEO url so I have this url (native url in opencart) : http://www.qcbikeshop.com/index.php?route=information/information&information_id=9 and the SEO url is : http://www.qcbikeshop.com/Livraison-Gratuite However, my SEO expert want me to do...

    Is it ok to mix storage engines on same database?

    mysql,opencart,collation,mariadb,storage-engines
    I have an OpenCart project with about 50,000 products in the database. I've switched the web hosting from a VPS to a dedicated server and I've seen some improvements, but still the website is laggy. On the VPS all the tables were MyISAM with latin1_swedish_ci collation on mysql 5.1.x.x ....

    .htaccess redirect to subdomain only for homepage (OpenCart)

    php,.htaccess,mod-rewrite,redirect,opencart
    I want to redirect from mydomain.com to shop.mydomain.com but I also want to make this redirect work ONLY for the main page. It's an Opencart page so all the pages have urls similar to http://shop.mydomain.com/index.php?route=information/information&information_id=14 so making a rule for the index file only is a no go from my...

    How can i rename the step in opencart 2.0

    php,opencart
    I am using opencart 2.0, and during the checkout i get options like **Checkout** Step 1: Checkout Options Step 2: Billing Details Step 5: Payment Method Step 6: Confirm Order How can i fix the order and display sequentially, or display something more appropriate and nice like tickmarks than displaying...

    Opencart 2x Request multiple rows data

    php,module,controller,opencart
    I try to make a simple image module. No errors, the only problem is data not saved(maybe)/not loaded everytime I visit this module back. Here's my code in controller: if (isset($this->request->post['photo_image'])) { $photo_images = $this->request->post['photo_image']; } elseif (isset($this->request->get['photo_image'])) { $photo_images = $this->model_module_photo->getProductImages($this->request->get['photo_image']); } else { $photo_images = array(); } $data['photo_images']...

    SQL Noob compare table in opencart

    sql,database,phpmyadmin,e-commerce,opencart
    I have one table called VEGAN with model numbers that i want 3800 rows with model or SKU codes. thats it. In the main oc_products table there are 15000 products / rows with over 20 columns, In one of those columsn there is a control for enabled which can be...

    OpenCart 1.5: how to disable caching for SVG?

    svg,opencart
    I think to use svg for images of brands - svg is responsive and good for displays with high DPI. But I have problem with caching mechanism of Opencart 1.5 than can't correct cache vector images and in browser I not see image. I not found (in search) any solution...

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

    drupal,yii,opencart
    I have the following code public function insert() { $template="information/news_form.tpl"; //Loading the template file for the insert page $this->template = ''.$template.''; $this->language->load('information/news'); // Calling language file $this->load->model('information/news'); // Calling model file $this->document->setTitle($this->language->get('heading_title')); $this->data['breadcrumbs'] = array(); // Home link $this->data['breadcrumbs'][] = array( 'text' =>...

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

    php,oop,web,opencart,opencart2.x
    I am newbie in opencart as well as in php. I am discovering opencart templates, I found $this->config->get this line, I am a little bit confused about this. I don't understand clearly. I this request we are using this object (current) access config object and call get method of config...

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

    opencart
    how to add extra tab without any extension in product page in opencart may be this is the code for extra tabs any one help? regards <div class="tabs-group"> <div id="tabs" class="htabs clearfix"><a href="#tab-description">Delivery </a> <?php if ($attribute_groups) { ?> <a href="#tab-attribute"><?php echo $tab_attribute; ?></a> <?php } ?> <?php if ($review_status)...

    Opencart search page custom product link structure

    php,opencart
    By default, in Opencart, on the search page when I search for a product, the products appear with the following link structure: sitename/product-name/?search=, but I want to change this to sitename/category/subcategory/product-name $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100)...

    add custom header for checkout page in opencart

    php,opencart
    I want add a custom header for my checkout page of opencart store. I have a website in opencart store and I don't want to show categories and search button at my checkout page as user already ready for shop now he didn't need of categories and search button. So...

    opencart make table of categories insted of carousel

    php,view,opencart
    I am just trying to remake manufacturers carousel so that it will show categories with their images. Part of it I have done. Now i jast want to show them in table 4 in a row. Here is the code that is file catalog/view/module/carousel.tpl/ <div id="carousel<?php echo $module; ?>" class="owl-carousel">...

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

    login,opencart
    I run an opencart shop 1.5.6.4 with vqmod installed. I installed xml from opencart in order to force a login before reaching my shop. So it's a closed shop. I customized my login page inside css to hide all menu bars and I "copied" the language selector from the shop...

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

    php,opencart,opencart2.x
    I would like to monitor which dashboard user ("admin") added new product to the database. The solution i was thinking about is simply adding another insert under admin > model > catalog > product.tpl under function addProduct(), which adds the user id to the custom column added before under oc_product....

    Manual 301 redirects in Opencart

    regex,apache,.htaccess,redirect,opencart
    I've changed a few URLs on my Opencart (version 1.5.6) website and then I've changed them one more time. Google started alerting me that there are dead links and now I'm trying fix things up by adding manual 301 redirects in .htaccess (I used to do this whenever I was...

    bug when I .load in opencart

    javascript,php,html,opencart
    I guys, I have this problem: I edited my checkout/cart.tpl and initially everything looks fine, but then when I "add cart" something the code changes automatically and everything be strange.. EXAMPLES: 1- Ok, when I enter in website and look to cart, everything looks fine 2- THE BUG/MISTAKE.. When I...

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

    php,html5,opencart
    <div class="form-group required"> <label class="col-sm-2 control-label" for="input-name">Type</label> <div class="col-sm-10"> <select name="name" id="input-name" class="form-control"> <option value="image" selected="selected">image</option> <option value="text">text</option> </select> </div> </div> I am using this code . In these if i select option image display only <div class="function1">Function1</div> If select option text display only <div...

    Registration page of opencart

    php,opencart
    I want to edit my register.tpl file of registration process of my opencart page. I just want to keep the email, password and confirm password fields. When I remove all other fields including first name, last name, address etc and only leave in email, password and confirm password fields, it...