Search found 479 matches

Search found 479 matches

Re: Custom product to cart

Prior to openCart 3 cart data was stored in the session $session->data['cart'], and in openCart 3 it's in cart table in the database. To add product to cart you do something like this: $this->cart->add($product_id, $quantity, $options); //$options is optional array You should research system/library...

Jump to post
  • Fri Mar 22, 2019 6:45 am
  • Replies 1
  • Views 218
Re: Order status variable not assigned

Your code looks correct, i don't see anything wrong.

Did you try:

Code: Select all

{% if status == 'Canceled' or status == 'Denied' %}
Anyway, it's probably better to do all that in the controller rather than in twig template.

Jump to post
  • Tue Feb 05, 2019 12:45 am
  • Replies 2
  • Views 189
Re: Relative vs Absolute Url on Opencart

You need to modify system/library/url.php . Changing this if ($this->ssl && $secure) { $url = $this->ssl . 'index.php?route=' . $route; } else { $url = $this->url . 'index.php?route=' . $route; } to this if ($this->ssl && $secure) { $url = '/index.php?route=' . $route; } else { $url = '/index.php?ro...

Jump to post
  • Tue Jan 01, 2019 7:45 pm
  • Replies 1
  • Views 292
Re: Custom Login

Customer login is implemented in the file system/library/cart/customer.php in openCart 2.2 or higher, or system/library/customer.php in earlier versions.

Jump to post
  • Sat Dec 22, 2018 6:33 am
  • Replies 2
  • Views 348
Re: Default language of the store

It tries to use the language that is set as preferred in your web browser first. So if your browser's most preferred language is English, and you have English available on your site, it'll show English version even if Arabic is default in site settings.

Jump to post
  • Tue Dec 18, 2018 6:06 pm
  • Replies 2
  • Views 125
Re: All ocmod extension changes not showing in admin or store

Make sure that both config.php and admin config.php have correct paths in DIR_STORAGE and DIR_MODIFICATION , admin/config.php has DIR_CATALOG defined, and config.php does not have DIR_CATALOG defined . Also go into your modification directory with FTP and see if it has directories and files inside b...

Jump to post
  • Tue Dec 18, 2018 1:07 pm
  • Replies 14
  • Views 1209
Re: Add logo to register email

Registration email is plain text, not html. You can change it to html by replacing $mail->setText with $mail->setHtml in catalog/controller/mail/register.php , and then perhaps editing the template - you can use catalog/view/theme/default/template/mail/order.twig as an example. Or you can add a logo...

Jump to post
  • Mon Dec 17, 2018 7:07 pm
  • Replies 2
  • Views 140
Re: How to set customer_group_id with PHP?

$b=$this->customer->getGroupId(); $this->db->query("UPDATE " . DB_PREFIX . "customer SET customer_group_id= '$a' WHERE customer_id = '$b'"); This is incorrect. Should be: $b=$this->customer->getId(); $this->db->query("UPDATE " . DB_PREFIX . "customer SET customer_group_id= '$a' WHERE customer_id = ...

Jump to post
  • Sat Dec 15, 2018 1:17 am
  • Replies 2
  • Views 211
Re: How to add item to cart after registration?

Edit file catalog/controller/account/register.php, find this line:

Code: Select all

$this->response->redirect($this->url->link('account/success'));
And add this line right above:

Code: Select all

$this->cart->add(51);

Jump to post
  • Fri Dec 14, 2018 12:33 am
  • Replies 2
  • Views 162
Re: sql query help

This will give you only one row per model: SELECT p.*, pd.*, COUNT(*) AS c FROM oc_product p, oc_product_description pd WHERE pd.product_id = p.product_id AND pd.language_id = 1 GROUP BY p.model HAVING c>1; And this will give you all rows with the same model, but only those models with more than 1 r...

Jump to post
  • Fri Dec 14, 2018 12:24 am
  • Replies 1
  • Views 152
Re: ERR_BLOCKED_BY_XSS_AUDITOR

This is a Chrome bug, not an openCart issue. Try using different browser, or this: edit file admin/controller/startup/startup.php and add this line anywhere inside function index:

Code: Select all

$this->response->addHeader('X-XSS-Protection:0');

Jump to post
  • Wed Dec 12, 2018 9:42 am
  • Replies 2
  • Views 427
Re: Recurring Payments - Paypal - Return url

OpenCart 2 handles PayPal Express IPN messages in catalog/controller/extension/payment/pp_express.php, function ipn() . Look for "recurring" inside that function. And IPN is much better than "success.php" even for non-recurring payments , it's more reliable and secure.

Jump to post
  • Tue Dec 11, 2018 2:59 am
  • Replies 3
  • Views 198
Re: 1000 x 0,05 = € 49,97 ??

Maybe change VAT tax rate to 21.06% or 21.07% ?

Jump to post
  • Sun Dec 09, 2018 4:47 am
  • Replies 2
  • Views 171
Re: Adcell Tracking Code error sucess.php

Here is what you should do: 1. Edit file catalog/controller/checkout/success.php . Find this: if (isset($this->session->data['order_id'])) { and right below add this: $this->load->model('checkout/order'); $o = $this->model_checkout_order->getOrder($this->session->data['order_id']); if($o) { $data['a...

Jump to post
  • Thu Dec 06, 2018 4:54 am
  • Replies 6
  • Views 748
Re: Error when trying to open an information page in admin

Your are using some extension or modification that does something with information page, and this extension / modification either has errors, or is installed incorrectly. Contact that extension's developer for support.

Jump to post
  • Wed Dec 05, 2018 11:59 am
  • Replies 1
  • Views 188
Re: A customer follows an Affiliate Product link but the Affiliate linking breaks as soon as they browse the Store

Once a user opens any openCart page with URL that contains tracking code, that tracking code is saved in cookies and no longer has to be in the URL. While that cookie exists tracking code is restored on every page visited by the user, and affiliate gets commission for all products purchased by that ...

Jump to post
  • Tue Dec 04, 2018 11:46 pm
  • Replies 3
  • Views 219
Re: Another SSL issue

but I understand that OC should jump between secure and insecure environments as required. It really shouldn't, if you have SSL (https), then just redirect all http requests to https. Use https:// in both HTTP_SERVER and HTTPS_SERVER in both config.php files as explained in the reply above, and als...

Jump to post
  • Mon Dec 03, 2018 1:54 am
  • Replies 2
  • Views 648

Search found 479 matches