Select displayed templated in url (&template=XXX)
- Nils Reinecke
- Topic Author
- Offline
- Junior Member
Less
More
10 years 4 months ago #48651
by Nils Reinecke
Visit www.buma-sports.com
Select displayed templated in url (&template=XXX) was created by Nils Reinecke
Hi,
It would be very helpfull to select the displayed template via url to work on the template while the shop is online.
For example:
Is this possible? Or would it be easy to integrate?
Greetings from Germany
Nils
It would be very helpfull to select the displayed template via url to work on the template while the shop is online.
For example:
- copy my template
- so i have to folders 1. /template/ 2. /template-copy/
- now i start working on /template-copy/
- when i finished i open my shop with somthing like "shop.com/index.php?option=com_eshop&template=template-copy" and i get my shop displayed with the new template instead of /template/
- the shop is still online for everybody with the old template (/template/)
Is this possible? Or would it be easy to integrate?
Greetings from Germany
Nils
Visit www.buma-sports.com
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
- Offline
- Administrator
10 years 4 months ago #48694
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Select displayed templated in url (&template=XXX)
Hi Nils,
EShop support multiple templates/themes, please read the documentation at eshopdocs.joomservices.com/extensions/themes.html
At the one time, there will be one theme is chosen as default.
Hope that this will help.
Sincerely, Giang
EShop support multiple templates/themes, please read the documentation at eshopdocs.joomservices.com/extensions/themes.html
At the one time, there will be one theme is chosen as default.
Hope that this will help.
Sincerely, Giang
The following user(s) said Thank You: Nils Reinecke
Please Log in or Create an account to join the conversation.
- Nils Reinecke
- Topic Author
- Offline
- Junior Member
10 years 4 months ago #48720
by Nils Reinecke
Visit www.buma-sports.com
Replied by Nils Reinecke on topic Select displayed templated in url (&template=XXX)
I know but is it possible to load the same shop in two different templates at the same time?
So see theme1 and other users see theme2?
Best regards
Nils
So see theme1 and other users see theme2?
Best regards
Nils
Visit www.buma-sports.com
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
- Offline
- Administrator
10 years 4 months ago #48748
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Select displayed templated in url (&template=XXX)
Hi Nils,
I know the thing that you want to have but this is not supported by EShop now. It is an outstanding feature and there are not much people need it.
Sincerely, Giang
I know the thing that you want to have but this is not supported by EShop now. It is an outstanding feature and there are not much people need it.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
- Nils Reinecke
- Topic Author
- Offline
- Junior Member
10 years 3 months ago #49217
by Nils Reinecke
Visit www.buma-sports.com
Replied by Nils Reinecke on topic Select displayed templated in url (&template=XXX)
Could you build me anything "dirty" just to view two different templates? i really need to build a new template with you new functions and stuff..
thanks
thanks
Visit www.buma-sports.com
Please Log in or Create an account to join the conversation.
- Nils Reinecke
- Topic Author
- Offline
- Junior Member
10 years 3 months ago #49221
by Nils Reinecke
Visit www.buma-sports.com
Replied by Nils Reinecke on topic Select displayed templated in url (&template=XXX)
So Giang,
got it on my own. Its dirty but i did it. Maybe you could implement somthing like that into your next release.
Just put the following into: com_eshop\helpers\helper.php
The result should look like this
Just add the paramenter "eshop_theme" to your url and fill it with the theme name.
Now you got the eshop displayed with the requested theme.
Hope this is a little insperation for your next release.
Looking forward to it
best regards
Nils
got it on my own. Its dirty but i did it. Maybe you could implement somthing like that into your next release.
Just put the following into: com_eshop\helpers\helper.php
Code:
if( $configKey == 'theme' ) {
return (isset( $_GET['eshop_theme'] ) && !empty( $_GET['eshop_theme'] ) ) ? $_GET['eshop_theme'] : ( $configValues[$configKey] ? $configValues[$configKey] : $default );
}
The result should look like this
Code:
public static function getConfigValue($configKey, $default = null)
{
static $configValues;
if (!isset($configValues["$configKey"]))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('config_value')
->from('#__eshop_configs')
->where('config_key = "' . $configKey . '"');
$db->setQuery($query);
$configValues[$configKey] = $db->loadResult();
}
if( $configKey == 'theme' ) {
return (isset( $_GET['eshop_theme'] ) && !empty( $_GET['eshop_theme'] ) ) ? $_GET['eshop_theme'] : ( $configValues[$configKey] ? $configValues[$configKey] : $default );
}
return $configValues[$configKey] ? $configValues[$configKey] : $default;
}
Just add the paramenter "eshop_theme" to your url and fill it with the theme name.
Now you got the eshop displayed with the requested theme.
Hope this is a little insperation for your next release.
Looking forward to it
best regards
Nils
Visit www.buma-sports.com
The following user(s) said Thank You: Giang Dinh Truong
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
- Offline
- Administrator
10 years 3 months ago #49292
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Select displayed templated in url (&template=XXX)
Hi Nils,
Congratulation on that. I will considering to add this feature into EShop if it is useful and there are many people want it.
Sincerely, Giang
Congratulation on that. I will considering to add this feature into EShop if it is useful and there are many people want it.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
Moderators: Giang Dinh Truong
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.