X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Easily swap-able skins (mod_skinswap) (https://forum.x-cart.com/showthread.php?t=117)

Lionel 12-14-2005 01:56 PM

Couple of questions about skin swap

1-How does it handle languages files since they are in skin1 directory and obviously not in skin2?

2-Is it possible to use it with a variable in auth.php like if customer is not log on display this skin else display other one?

B00MER 12-14-2005 02:09 PM

1) Since languages are storred in skin1, you'll need to duplicate the skin1/pages/CODE/*.html files as to keep the same static pages across all skins. OR you can easily use the languages variable to redirect the customer to a language specific skin.

2) Yes, it is possible to condition the skin swap mod in different methods. You'll need to know some PHP and how to condition the skin swap. Take a look at the readme.txt file on the details page for more details on how it all works.

Lionel 12-14-2005 02:13 PM

Quote:

Originally Posted by B00MER
1) Since languages are storred in skin1, you'll need to duplicate the skin1/pages/CODE/*.html files as to keep the same static pages across all skins. OR you can easily use the languages variable to redirect the customer to a language specific skin.


Thanks for quick answer.

Second option is more attractive as one cannot ask customer to move files everytime. How would I go about doing that?

B00MER 12-14-2005 02:24 PM

You can just set skinswap to use sl for the swap variable, then setup a skin_swap/ directory or repository where all your language based skins will be.

so you would have skin_swap/US and skin_swap/SP as US and SP would be the values of the sl= if I changed languages from English to Spanish.

Basically skin_swap looks at the value of the variable used in swapping to change out into. Same goes for affiliates, you would use the partner variable to swap with and have sub directories under skin_swap/ with your partners username or whatever values is in the GET URI you want to swap with.

hth.

Lionel 12-14-2005 04:46 PM

I foresee one problem with that technique, with dynamically created pages.php. Maybe there is a way, at creation time, to write into multiple pages directory?

Skin1/pages/US
Skin1/pages/FR
Skin1/pages/AR

and

Skin2/pages/US
Skin2/pages/FR
Skin2/pages/AR

Lionel 12-14-2005 04:49 PM

Seems also that this will not be compatible with terrafirma image mod, which uses filesystem to store image. Is that the case? That would be a shame cause your mod is almost perfect for what I want to do.

B00MER 12-14-2005 06:01 PM

Like I say theres many ways to approach it.

But yes, admin/pages.php could easily be modified to loop over the found directories of the skin_swap/ repository directory and output the same contents.
Code:

        if ($mode == "modified") {
        #
        # Save created/modified page
        #

start here ;)

B00MER 12-14-2005 07:29 PM

Quote:

Originally Posted by Lionel
Seems also that this will not be compatible with terrafirma image mod, which uses filesystem to store image. Is that the case? That would be a shame cause your mod is almost perfect for what I want to do.


If he's using X-Cart's product image functions then there will be no difficulties as the image itself doesn't come from the tpl files, which is all skin swap is "swapping" out.

Lionel 12-14-2005 08:27 PM

thanks boomer. If all goes well tomorrow, then Xcart, you and terrafirma will make another sales.

sfabrik 02-22-2006 07:40 AM

Not working with 4.0.17
 
I can't get this mod to work with Smarty-2.6.9 Cart version 4.0.17.
Anyone had luck getting it going on these versions?


All times are GMT -8. The time now is 03:54 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.