Oxidshop - Get oxSession variable inside tpl file - oxid

I am trying to print an oxsession variable inside a tpl file. The tpl file is actually a block which extends basketcontents.tpl file. Any idea how I can achieve it?

try [{$smarty.session.YOUR_VARIABLE}]

Related

How to declare and use map var in yaml file?

I try to write a map in y yaml file and want to use it in yaml file itself with a key. for example ->
in my yaml file I wrote -
pod_env_map:
pod1: "env1"
pod2: "env2"
pod3: "env3"
and in this yaml file itself I'm getting a var $pod_name.
So now i want to write stages with some command for all pod and correspond env.
So instead of putting multiple checks of $pod_name == 'pod1'....
I want to use above dict somehow in code like pod_env_map[$pod_name], please help me to know what should be the syntax for this? I tried to find but didn't get relavent info anywhere.

Create a dynamic path inside a yaml file

I have a yml file that contains a path for data source. Something like this:
data_source: s3://bucket/file.csv
I want to change the job to grab only the file with yesterday appended to the title, for example:
file-2021-10-21.csv
so basically, something like this:
data_source: s3://bucket/file-{yesterday}.csv
How can i define it in the yaml file? thanks!
You can have something like below, where all files defined under 'files' variable
data_source: s3://bucket/file-
files:
- 2021-10-21.csv
- 2021-10-21.csv

Laravel - How to declare a file path constent in .env file?

In one of my Laravel based application, I want to include a JSON key file that is currently located in public/key/store.json
Now I want to write a constant in Laravel .env file so that I can access that file anytime I want. So, I write the following line of code:
KEY_FILE='/public/key/store.json'
But it show file path does not exist.
Can anyone tell me what's wrong in my declaration?
you should push your path in your app/config.php not in your .env

Register a list of variables from file in ansible

I have a file /tmp/components_list with a content like this:
ComponentA: '1263'
ComponentB: '989'
ComponentC: '1354'
I want to register variables in ansible (without quotes), according to the content of file and use them in the yml code.
So, as a result I need something like that:
- name: Get variables from file
Some actions with a file /tmp/components_list
- name: Using these variables
shell: docker run --name component artifactory:5100/radware/Component:{{ComponentA}}
So it should be a number in the variable ComponentA.
How can I do it by using ansible? Thanks!
You can use include_vars statement, see also How to include vars file in a vars file with ansible?

Dealing with ini Files - Add Enivornment Variable

i am trying to add an evironment variable to a path inside an ini file, the variable is the current username in Windows which can be accessed via %username%.
so i would like to do path = c:\users\[username variable]\ ...
Will appreciate anyhelp
Use ExpandEnvironmentStrings().
See WritePrivateProfileString() and friends...

Resources