Search found 49 matches

Search found 49 matches

Re: Where in the code is the INSERT statement into cart table

As an attempt, I called

Code: Select all

$this->session->data['customer_id'] = $customer['customer_id'];
and voilà! The column customer_id in cart table was saved with the actual customer id.

However, if you have other suggestion it will be welcome.

Thanks
Jaime

Jump to post
  • Tue Mar 29, 2022 2:59 am
  • Replies 7
  • Views 1106
Re: Where in the code is the INSERT statement into cart table

The $this->cart is the object calling the system/library/cart/cart.php library file. It has nothing to do with the API but can be used with the API. However, I would suggest the use of an Event in order to accomplish this goal. Thanks, I have found the cart object and the add method. I was expectin...

Jump to post
  • Tue Mar 29, 2022 2:43 am
  • Replies 7
  • Views 1106
Where in the code is the INSERT statement into cart table

Hello, I have created a new OpenCart 3 extension. From a view of that extension, I am adding a product to the cart. To do so, I am doing this call using Ajax: $.ajax({ url: 'index.php?route=checkout/cart/add', method: 'POST', data: 'product_id={{ product_id }}' + '&quantity=' + $('#alumnos').sel...

Jump to post
  • Tue Mar 29, 2022 1:37 am
  • Replies 7
  • Views 1106
Re: How to avoid "&" to be replaced by "&" in twig? raw filter does not work.

Finally, I did this as a workaround: let url = '{{ action_previous }}'.replace(/&/g, '&'); It is not that beautiful but it works. However, I need to understand why, if controller passes that link to the view correctly, using just `&`, twig engine replaces that by `&` but only...

Jump to post
  • Mon Mar 28, 2022 7:42 pm
  • Replies 31
  • Views 1910
Re: How to avoid "&" to be replaced by "&" in twig? raw filter does not work.

You need to take care when setting JavaScript variables. If $prevStep could be set from an input. You would need to escape it for the correct context. $data['action_previous'] = html_entity_decode($this->url->link('extension/module/colegio', 'paso=' . $prevStep), ENT_QUOTES, 'UTF-8'); let url = '{{...

Jump to post
  • Mon Mar 28, 2022 7:32 pm
  • Replies 31
  • Views 1910
Re: How to avoid "&" to be replaced by "&" in twig? raw filter does not work.

Regardless, in the context of this topic, it shows that the & is in the JS code. I see you still didn't help the OP. OP can try This . $prevStep = "https://example.cl/index.php?route=extension/module/colegio&paso=1"; $data['action_previous'] = html_entity_decode($prevStep,...

Jump to post
  • Mon Mar 28, 2022 7:27 pm
  • Replies 31
  • Views 1910
Re: How to avoid "&" to be replaced by "&" in twig? raw filter does not work.

Use js function: Terrible idea. Outputting the correct link on a page should be done by server-side code, not JavaScript. However, this seems to be done by twig. Controller assignes the variable in a right way, using just `&`. That entity is translated to `&` just when rendering in the ...

Jump to post
  • Mon Mar 28, 2022 7:21 pm
  • Replies 31
  • Views 1910
Re: How to avoid "&" to be replaced by "&" in twig? raw filter does not work.

Yes, agreed. Seeing & from JS in the URL is not normal from the browser and needs to be parsed when that happens. Yes in the URL - he says SOURCE CODE - Oh well I must have completely misunderstood. Yes... I said source code in order to see how the URL is rendered. Of course, if I click the...

Jump to post
  • Mon Mar 28, 2022 7:17 pm
  • Replies 31
  • Views 1910
How to avoid "&" to be replaced by "&" in twig? raw filter does not work.

Hello, I am passing a variable containing a URL from controller to view, this way: $data['action_previous'] = $this->url->link('extension/module/colegio', 'paso='.$prevStep); The actual URL is: https://example.cl/index.php?route=extension/module/colegio&paso=1 If I write this directly in the tem...

Jump to post
  • Sun Mar 27, 2022 3:34 am
  • Replies 31
  • Views 1910
Re: RestFul API with no IP limitation

Not sure if the question was understood. But never mind. I created an OCMOD extension that replaces a code in an api controller so that always it recognizes the client IP.

Regards
Jaime

Jump to post
  • Fri Apr 16, 2021 9:53 am
  • Replies 3
  • Views 591
RestFul API with no IP limitation

Hello, I need to get all products in the catalog from other system. I was looking at the administration interface in OpenCart and I saw that the API RestFul user is limited by IP. Why is that? in my case that restriction is not feasible because the computer the requests will be made from has dynamic...

Jump to post
  • Fri Apr 16, 2021 4:09 am
  • Replies 3
  • Views 591
Re: Page links use http instead of https even when SSL is configured for the site

That's the point. If the site is configured to use SSL, why HTTP_SERVER setting is used sometimes? It was common to run non-secure pages in http and your checkout / account pages in https mainly for speed. Many years ago SSL was slow, CDN's had poor support, some hosting providers actually had sepa...

Jump to post
  • Fri Jul 31, 2020 3:36 am
  • Replies 14
  • Views 3063
Re: Page links use http instead of https even when SSL is configured for the site

It's sure not a Bug, you just don't understand the system, as it looks ... Hello.... let me teach you what I have found out so that you will learn. I am an engineer who also develops complex systems in many programming languages. Since I always need to know the base of a problem instead of trying t...

Jump to post
  • Fri Jul 31, 2020 3:03 am
  • Replies 14
  • Views 3063
Re: Page links use http instead of https even when SSL is configured for the site

IP_CAM wrote:
Fri Jul 31, 2020 2:34 am
you might find some answers on this here:
viewtopic.php?f=190&t=219272#p794862
i read that link but I did not find any related to the problem. Problem there is concerning images and fonts. That is not my case. My case is regarding https or http in page links.

Jump to post
  • Fri Jul 31, 2020 2:46 am
  • Replies 14
  • Views 3063
Re: Page links use http instead of https even when SSL is configured for the site

After this change, you might want to add a rewrite rule to your .htaccess to redirect http to https. Thanks. I can do that but that is a way to ensure that an ordinary user tried to connect to http instead of https. In this case, it will act also as a patch to a bad behaviour of the Open Cart platf...

Jump to post
  • Fri Jul 31, 2020 2:36 am
  • Replies 14
  • Views 3063
Re: Page links use http instead of https even when SSL is configured for the site

I figured, it's either: // HTTP define('HTTP_SERVER', 'http://tienda.zzz.com/'); // HTTPS define('HTTPS_SERVER', 'http://tienda.zzz.com/'); or then: // HTTP define('HTTP_SERVER', 'https://tienda.zzz.com/'); // HTTPS define('HTTPS_SERVER', 'https://tienda.zzz.com/'); depending on, how the Site is ac...

Jump to post
  • Fri Jul 31, 2020 2:32 am
  • Replies 14
  • Views 3063
Re: Page links use http instead of https even when SSL is configured for the site

This is: // HTTP define('HTTP_SERVER', 'http://tienda.zzz.com/'); // HTTPS define('HTTPS_SERVER', 'https://tienda.zzz.com/'); // DIR define('DIR_APPLICATION', '/home/zzz/tienda/catalogo/catalog/'); define('DIR_SYSTEM', '/home/zzz/tienda/catalogo/system/'); define('DIR_IMAGE', '/home/zzz/tienda/catal...

Jump to post
  • Fri Jul 31, 2020 1:00 am
  • Replies 14
  • Views 3063
Page links use http instead of https even when SSL is configured for the site

Hello, I just installed OpenCart 3.0.3.3 and configured SSL, however, the following URL's are generated using http instead of https : all information pages /index.php?route=information/contact /index.php?route=information/sitemap /index.php?route=product/manufacturer /index.php?route=product/special...

Jump to post
  • Thu Jul 30, 2020 11:16 pm
  • Replies 14
  • Views 3063
Re: How to reinstall a VQMOD module or change an existing one

Thank you for your help. The dashboard cache refresh did it. I have only refreshed extension modifications.

Regards
Jaime

Jump to post
  • Thu Jul 30, 2020 5:45 am
  • Replies 3
  • Views 314
[SOLVED] How to reinstall a VQMOD module or change an existing one

Hello, I have installed a VQMOD module that adds a "home" link in the categories menu. That worked, however, the text of that link is "Home". I need it to be in Spanish, so I edited XML file present in VQMOD/xml and change the text, but change was not applied. I have deleted all ...

Jump to post
  • Thu Jul 30, 2020 5:39 am
  • Replies 3
  • Views 314

Search found 49 matches