Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Easily swap-able skins (mod_skinswap)

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #41  
Old 12-14-2005, 01:56 PM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

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?
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #42  
Old 12-14-2005, 02:09 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #43  
Old 12-14-2005, 02:13 PM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

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?
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #44  
Old 12-14-2005, 02:24 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #45  
Old 12-14-2005, 04:46 PM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

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
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #46  
Old 12-14-2005, 04:49 PM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

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.
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #47  
Old 12-14-2005, 06:01 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #48  
Old 12-14-2005, 07:29 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #49  
Old 12-14-2005, 08:27 PM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

thanks boomer. If all goes well tomorrow, then Xcart, you and terrafirma will make another sales.
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #50  
Old 02-22-2006, 07:40 AM
 
sfabrik sfabrik is offline
 

Newbie
  
Join Date: Dec 2005
Posts: 7
 

Default 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?
__________________
4.0
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:21 AM.

   

 
X-Cart forums © 2001-2020