Jump to content

Different affiliates templates


polle

Recommended Posts

what do you mean by different templates

if you are talking about images than yes

 

Hi John.

 

I mean have a different template for each affiliate, so the landing page has its own images, styles, logo, etc...

 

Kind of simulating different websites.

 

Can you please share how ?

 

 

Thanks.

Link to comment
Share on other sites

Complementing gr2 tip, you can auto set it inside * page, putting this before the header php commands:

 

switch($aff) {
case "001":
	$CONFIG["Domain"].="?systpl=<TEMPLATE_FOR_001>";
	break;
case "002":
	$CONFIG["Domain"].="?systpl=<TEMPLATE_FOR_002>";
	break;
}

 

Note: i'm considering the "Domain" configuration in General settings doesn't have any vars. Otherwise, replace "?" before systpl in the code above with the "&" character.

 

This way you don't need to insert the systpl var in affiliate urls.

 

Hope this helps. ;)

Edited by RenatoMN
Link to comment
Share on other sites

brilliant.

 

would be nice if template and lang vars could be selected from a drop menu on the affiliates page.

 

nice idea for branding affiliates.

 

what about a way to hide the url or to mask the domain to xyz.com?

Link to comment
Share on other sites

Thanks to both.

 

But actually theres a problem with both solutions, as I have whmcs in a subdirectory, after the page loads it redirects to the domain itself, showing the site and not the affiliate page in the subdirectory. Any idea how to fix that ?

 

gr2, it works but it redirects to the domain, so I have to go back manually to see the changes.

 

RenatoMN, client1 and client2 should be the name of my templates folders and thats it with this code ? Nothing else to change ?

 

switch($aff) {
case "001":
	$CONFIG["Domain"].="?systpl=<client1>";
	break;
case "002":
	$CONFIG["Domain"].="?systpl=<client2>";
	break;
}

 

What do I need to modify so it stays in the subdirectory?, I was not able to see the changes, not even going back manually.

 

What do you mean by "doesn't have any vars. Otherwise, replace "?" before systpl in the code above with the "&" character."

 

I have just the domain for domain and the whmcs url pointing to the subdirectory, is there something else I should add ?

 

 

Thanks.

Link to comment
Share on other sites

Sorry, polle, but I couldn't understand what you need (maybe because of my limited English).

 

Please, say what you want your affiliate url to be (the final, after the redirect).

 

I will then guide you, step by step how you should set it up.

Link to comment
Share on other sites

Sorry, polle, but I couldn't understand what you need (maybe because of my limited English).

 

Please, say what you want your affiliate url to be (the final, after the redirect).

 

I will then guide you, step by step how you should set it up.

 

Hi Renato.

 

Actually theres no problem with the URL, the problem for example is if I use this:

 

domain.com/whmcs/*?aff=001&systpl=cliente1 it redirects to domain.com and not to domain.com/whmcs where its the actual whmcs directory. The change of the template is success tho if I go back to the directory.

 

And with your solution, that actually is the one I would like to make work, it just redirects to the domain with no template change.

 

[spanish]

Hola Renato.

 

El problema es que al escribir la url con el cambio de estilo, se redirecciona al domino principal y no se queda en el directorio en donde esta el WHCMS, entonces si escribo esto: domain.com/whmcs/*?aff=001&systpl=cliente1 la pagina se va a esto: domain.com tengo que darle regresar para ver de nuevo el whmcs y si se ve el cambio de template, pero tengo que regresar a mano a el.

 

Y con la solución que tu me diste, que de hecho es la que me gustaría implementar, no funciona, si entro a domain.com/whmcs/*?aff=001 se redirecciona al dominio principal y si regreso al whmcs no hay cambio alguno en el template.

 

Los nombres de mis templates son "client" y mi instalación esta dentro de un subdirectorio y no en la raíz del dominio, si lo pongo como a continuación, sucede lo que te comento arriba.

 

switch($aff) {
case "001":
	$CONFIG["Domain"].="?systpl=<client1>";
	break;
case "002":
	$CONFIG["Domain"].="?systpl=<client2>";
	break;
}

 

Que tendría que cambiar ?

 

[/spanish]

 

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated