Search found 24 matches

Search found 24 matches

Re: Get the firstname of the user logged in (in admin panel)

DigitCart wrote:
Mon Oct 15, 2018 9:57 pm
I tried in the controller/common/header.php
I just tested in header.php and it worked. make sure you've cleared caches.
:/ I generaly have deactivated caching for admin menu. I cleared it once more but did not work. However I will look into it further just in case there is a problem.

Jump to post
  • Tue Oct 16, 2018 2:36 pm
  • Replies 13
  • Views 11335
Re: Get the firstname of the user logged in (in admin panel)

Hi, admin and catalog are separate. if you want to get the user ID of admin in catalog (front-end), in your controller file use: $this->user = new Cart\User($this->registry); $user_id = $this->user->getId(); // Returns null or user ID I tried in the controller/common/header.php with no results, unl...

Jump to post
  • Mon Oct 15, 2018 9:39 pm
  • Replies 13
  • Views 11335
Re: Get the firstname of the user logged in (in admin panel)

$GLOBALS is disabled by default in OC from the system folder for security reasons. A parameter needs to be passed with the username which is why I indicated above that the user ID would be more relative since a similar method already adds a user into the database as you demonstrate already. You jus...

Jump to post
  • Mon Oct 15, 2018 8:59 pm
  • Replies 13
  • Views 11335
Re: Get the firstname of the user logged in (in admin panel)

Update: I edited file "admin/controller/common/header.php" public function index() { $user_name = $this->user->getUserName(); $this->load->model('user/user'); $user_info = $this->model_user_user->getUser($this->user->getId()); $GLOBALS["name_for_added_by"] = $user_name ; //either...

Jump to post
  • Sat Oct 13, 2018 7:04 pm
  • Replies 13
  • Views 11335
Re: Get the firstname of the user logged in (in admin panel)

straightlight wrote:
Sat Oct 13, 2018 4:22 am
Better to use the user ID than the username on the database for tracking purposes.
You are right and thank you for the suggestion. However for the purposes I need and the current situation, the username is enough.

Jump to post
  • Sat Oct 13, 2018 3:54 pm
  • Replies 13
  • Views 11335
Re: Get the firstname of the user logged in (in admin panel)

Hi, In your controller file, use it: Thanx for the answer! I managed to make it work in the header and any variabe I want from the user is accesible but I can not pass any variable in the 'public_html/catalog/model/checkout/order.php' file. So, final question: where is the controller file that I ne...

Jump to post
  • Sat Oct 13, 2018 3:52 pm
  • Replies 13
  • Views 11335
Get the firstname of the user logged in (in admin panel)

Hello, as the title suggests, I am trying to get the firstname (or maybe the lastname and username also from the user name), so that I can add it to a custom query in order_history. What I have made so far (maybe a little irrelevant from what I am asking): in the file /catalog/model/checkout/order.p...

Jump to post
  • Sat Oct 13, 2018 1:00 am
  • Replies 13
  • Views 11335
Re: Creating a third checkout "Receive from store" after Create account and guest checkout.

well, there would be easier ways, to achieve such, I assume... ;) Ernie --- https://www.opencart.com/index.php?route=marketplace/extension&filter_download_id=55&filter_search=pick%20up%20in%20store --- Certainly there are other ways and probably easier ways. Unfortunately, I have not found ...

Jump to post
  • Wed Sep 26, 2018 3:04 pm
  • Replies 2
  • Views 20014
Creating a third checkout "Pickup from store" after Register account and Guest checkout options

I am trying to create a third checkout option after Register account and guest checkout. I will name it Pickup from store. What I have done so far: Step 1) Here: /catalog/view/theme/default/template/checkout/checkout.twig I found on line 145 (url: 'index.php?route=checkout/' + $('input[name=\'accoun...

Jump to post
  • Tue Sep 25, 2018 8:27 pm
  • Replies 2
  • Views 20014
Re: Order as Guest2 (Third checkout option to use as "receive from shop")

My oc version is 3.1 but is it such a big change as I post it under the opencart 3 forum section (just scientificaly asking :) )?

Will do post there. Thank you for your directions.

Jump to post
  • Mon Sep 24, 2018 3:19 pm
  • Replies 2
  • Views 265
Order as Guest2 (Third checkout option to use as "receive from shop")

Straight on topic: when making the order we have 2 options 1) with account 2) guest checkout I want to create another (3) checkout option to use as (lets say) "take the products from the store" or "receive orders from the physical shop". If I have the information on how to create...

Jump to post
  • Thu Sep 20, 2018 6:30 pm
  • Replies 2
  • Views 265
Re: Send Email from script outside Opencart

pprmkr wrote:
Mon Sep 10, 2018 8:37 pm
You did not read the settings from database.
Yes indeed! Your fix was spot on! Thanx for the help! ;)

Jump to post
  • Wed Sep 12, 2018 3:32 pm
  • Replies 2
  • Views 1130
Send Email from script outside Opencart

Hello Opencart Forum, I am trying to create a php file that alongside other actions, like sending an SMS (which is working fine), the script also needs to send an email (it fails obviously). Simple as that. I had some problems trying to require_once the config, startup and library/email files but I ...

Jump to post
  • Mon Sep 10, 2018 3:20 pm
  • Replies 2
  • Views 1130
Re: Multiple Bank Payment (each for different bank in opencart3)

You need to change also in .twg files... LE. Try now Hello, Thanks for awesome extension. I download your files and upload to my OC Version 3.0.2.0 directory this work perfect for bank transfer2, I need more bank transfers I replace transfer2 to transfer3 in all files and save the file with transfe...

Jump to post
  • Mon Sep 10, 2018 2:47 pm
  • Replies 9
  • Views 1061
Re: Multiple Bank Payment (each for different bank in opencart3)

xxvirusxx wrote:
Fri Jun 15, 2018 10:16 pm
I made you bank transfer 2 ocmod...just install and work.
you are awesome! ;) it works perfectly! Big thanx!!!

Jump to post
  • Sat Jun 16, 2018 1:24 am
  • Replies 9
  • Views 1061
Re: Multiple Bank Payment (each for different bank in opencart3)

straightlight wrote:
Fri Jun 15, 2018 9:27 pm
No OC version posted. Check your server access logs for the recent errors of 500.
Opencart 3 (included in the title)
But you are right. I will edit the post and include it.

Useful tip. I will check the server logs. Thank you

Jump to post
  • Fri Jun 15, 2018 10:14 pm
  • Replies 9
  • Views 1061
Re: Multiple Bank Payment (each for different bank in opencart3)

You need to change also in .twg files... I did. I think it is the following list (correct me if I miss something): Admin /admin/controller/extension/payment /admin/language/en-gb/extension/payment /admin/view/template/extension/payment Catalog /catalog/controller/extension/payment /catalog/language...

Jump to post
  • Fri Jun 15, 2018 10:13 pm
  • Replies 9
  • Views 1061
Multiple Bank Payment (each for different bank in opencart3)

Hello forum, I am trying to multiply the bank payments (opencart 3.0.2.0). At first I try to copy the files under admin and catalog > (model, view, language...)/extensions/payment/ () and paste them with different name like banktransfer2.php and banktransfer3.php then I tried to replace inside of ea...

Jump to post
  • Fri Jun 15, 2018 8:25 pm
  • Replies 9
  • Views 1061
Re: Same cart in multi stores problem

hmmm... mod for opencart3 it is then.... thank you!!!

Jump to post
  • Wed May 02, 2018 3:28 pm
  • Replies 3
  • Views 514
Same cart in multi stores problem

I have working multistores but the cart is unique in each one. Can I have the same cart in every shop? I search my friend google but some say it is the same cart by default, some say it can not be done. What is the correct answer? Can I have the same cart in every shop? If yes, then what must I do? ...

Jump to post
  • Fri Apr 27, 2018 2:51 pm
  • Replies 3
  • Views 514

Search found 24 matches