Change WHMCS template by custom field - smarty

maybe somebody can help me with this.
I have 2 brands working in 1 whmcs, i used a custom field called "Provider" and according to that email designs and template is being loaded now. But!
I need or want that if a customer login to whmcs, if he has selected provider X load template X and if i his profile he has selected provider Y load template Y.
Any idea about how can i do this via hook? thank you!

You can change template on the fly by setting systpl variable in the url to the desired template folder, as mentioned in the Testing docs, for example:
https://example.com/index.php?systpl=template-x

thank you for your answer.
My question was focused to this "I need or want that if a customer login to whmcs, if he has selected provider X load template X and if i his profile he has selected provider Y load template Y."
I mean, that i need that template being loaded not via URL, but, detect a custom field and load a determinated template according to that.
Some idea?
Thank you!

Related

How do I get Magento 2 data to use in the template?

I am starting in the Magento development world, and I'm creating a new theme.
On my theme, I have a block which displays business contact info, but I don't know how to get the data from the store.
I have to make a custom menu as well, but stop in the same problem: getting category data from the store.
I also wanted to know if there is any place where you can find more references on this data return issue, such as what available methods and classes are available, for example.
Where do you want to display the custom data ? In a product page or your custom module's separate page ?
If you want to use custom block in sidebar you can follow steps given here
https://aureatelabs.com/magento-2/how-to-add-a-static-block-in-a-sidebar-column-magento-2/.
Here are some ref you can use:
https://itectec.com/magento/magento-magento-2-get-custom-module-data-in-theme-phtml/
https://code.vky.co.in/display-custom-module-collection-data-frontend-magento-2/

Template not displaying correctly

I've just had to reinstall Joomla as the template didn't seem to display correctly.
It should look like this demo
http://demo.joomla-monster.com/190-jm-lifestyle
But it looks like this.
www.ultimatemuscleperformance.co.uk
Does anyone have any idea why?
I'm really new to Joomla but I thought all of that would be displayed by default
*strong text*The template you've installed probably uses different named module positions to the template you were using before.
For example, lets say you assigned a login module to "position-7" (right sidebar) on your first template, you then install this new template. The module won't show because the new template uses the name "right-column" instead.
Here is a map of the module positions your template provides:
http://www.joomla-monster.com/knowledge-base-area/templates-documentation/templates-for-joomla-3-0/jm-lifestyle/template-layout
So all you need to do is assign the modules that aren't showing to a position shown on the link above
Hope this helps

Automatically generating Customer Attribute Form Fields

When you add customer attributes, Magento's admin dashboard for customer's automatically generates the relative form element for that new attribute.
Is there a way to do the same thing on the front end via a controller in a module?
nope, the frontend customer fields are hard coded, check out the phtml inside customer/form to see it.
What are you trying to achieve? Customer attributes are displayed on the form if "Show on frontend" is enabled. However those fields aren't saved from frontend by default. You need to extend fieldsets in your module for that, see config.xml in core Mage/Customer module
EDIT: actually that is true for enterprise edition, on CE you have to edit register.phtml (preferably by making a copy in your theme)

component backend menu with variable

How to create backend menu link with variable e.g. userID to own component?
I know that is possible to make xml file in view but how to insert variable there?
Thanks.
For your front ent component you will aslo add its backend component. Links in Joomla 1.5 are normally managed in the MySQL table called jos_components. Take a look at the fields in jos components called: link,menuid,parent,admin_menu_link, admin_menu_alt.

In a custom Joomla! template, how can I determine whether I am on the home page?

I am trying to create a custom template, but I want the template to look a little different for my Joomla! homepage/frontpage. Is there a easy boolean-type expression I can use to determine whether I am on my site's homepage?
That way, I can just say if ($on_homepage) { [custom homepage html] } else { [regular template] }
Thanks in advance!
You can create a separate template for your homepage. More details here.
This is very easy, just create 2 templates. One for your homepage and one for the rest of your site. Then install both, make sure you give them a descriptive name in their xml file so you know the difference.
Once they are installed you can set a default template that would be site wide. Then choose/click on your homepage template and it's options will load up. On the bottom left you can select the menu items where this template will be visible. This setup is very much like the way in which you define where modules are shown.

Resources