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

Developer's doc??

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-28-2006, 10:27 AM
  bebekisses.com's Avatar 
bebekisses.com bebekisses.com is offline
 

Senior Member
  
Join Date: Dec 2006
Posts: 163
 

Default Developer's doc??

Folks,

I'm trying to work on some customization of the smarty templates for our cutover to xcart.

Is there a list of smarty variables used available to the template developers?

Thanks!!
__________________
http://www.tdg-i.com - A web Solutions Company
http://www.bebekisses.com
X-Cart Gold v4.1.4 Gold
- Custom AJAX Swatch color preview based on extjs
- Custom Layout

Managing: http://www.hotsutra.com (Not work safe) Adult toy store.
- Currently developing custom mods, to be disclosed once complete and deployed.


contact info: jgarcia at tdg-i.com
Reply With Quote
  #2  
Old 12-28-2006, 10:36 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Developer's doc??

Your best bet is to use "webmaster" mode in the admin.
Reply With Quote
  #3  
Old 12-28-2006, 10:41 AM
  bebekisses.com's Avatar 
bebekisses.com bebekisses.com is offline
 

Senior Member
  
Join Date: Dec 2006
Posts: 163
 

Default Re: Developer's doc??

Thanks, but that does nothing for smarty variables.
__________________
http://www.tdg-i.com - A web Solutions Company
http://www.bebekisses.com
X-Cart Gold v4.1.4 Gold
- Custom AJAX Swatch color preview based on extjs
- Custom Layout

Managing: http://www.hotsutra.com (Not work safe) Adult toy store.
- Currently developing custom mods, to be disclosed once complete and deployed.


contact info: jgarcia at tdg-i.com
Reply With Quote
  #4  
Old 12-28-2006, 12:10 PM
  bebekisses.com's Avatar 
bebekisses.com bebekisses.com is offline
 

Senior Member
  
Join Date: Dec 2006
Posts: 163
 

Default Re: Developer's doc??

added
Code:
$x = $smarty->get_template_vars(); function print_r_string($arr,$first=true,$tab=0) { $output = ""; $tabsign = ($tab) ? str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;',$tab) : ''; if ($first) $output .= "<pre><br>\n"; foreach($arr as $key => $val) { switch (gettype($val)) { case "array": $output .= $tabsign."[".htmlspecialchars($key)."] = array(".count($val).")\n".$tabsign."(\n"; $tab++; $output .= print_r_string($val,false,$tab); $tab--; $output .= $tabsign.")\n"; break; case "boolean": $output .= $tabsign."[".htmlspecialchars($key)."] bool = '".($val?"true":"false")."'\n"; break; case "integer": $output .= $tabsign."[".htmlspecialchars($key)."] int = '".htmlspecialchars($val)."'\n"; break; case "double": $output .= $tabsign."[".htmlspecialchars($key)."] double = '".htmlspecialchars($val)."'\n"; break; case "string": $output .= $tabsign."[".htmlspecialchars($key)."] string = '".((stristr($key,'passw')) ? str_repeat('*', strlen($val)) : htmlspecialchars($val))."'\n"; break; default: $output .= $tabsign."[".htmlspecialchars($key)."] unknown = '".htmlspecialchars(gettype($val))."'\n"; break; } } if ($first) $output .= "</pre>\n"; return $output; } echo print_r_string($x); // for Example


to the bottom of init.php
and got a huge burst of information. time to parse.
[code]


[SCRIPT_NAME] string = '/store/product.php'
[ImagesDir] string = '/store/skin1/images'
[SkinDir] string = '/store/skin1'
[template_dir] string = '/var/www/html/store/skin1'
[skin_config] string = 'skin1.conf'
[http_location] string = 'http://192.168.1.18/store'
[https_location] string = 'https://192.168.1.18/store'
[xcart_web_dir] string = '/store'
[current_location] string = 'http://192.168.1.18/store'
[php_url] = array(2)
(
[url] string = 'http://192.168.1.18/store/product.php'
[query_string] string = 'productid=1&cat=3&page=1&DEBUG=true'
)
[var_dirs_web] = array(1)
(
[cache] string = 'http://192.168.1.18/store/var/cache'
)
[catalogs] = array(4)
(
[admin] string = 'http://192.168.1.18/store/admin'
[customer] string = 'http://192.168.1.18/store'
[provider] string = 'http://192.168.1.18/store/provider'
[partner] string = 'http://192.168.1.18/store/partner'
)
[catalogs_secure] = array(4)
(
[admin] string = 'https://192.168.1.18/store/admin'
[customer] string = 'https://192.168.1.18/store'
[provider] string = 'https://192.168.1.18/store/provider'
[partner] string = 'https://192.168.1.18/store/partner'
)
[files_location] string = '/var/www/html/store/files'
[XCARTSESSNAME] string = 'xid'
[XCARTSESSID] string = '5c891781b11f0fe62bacf4e6239ef4dd'
[number_format_dec] string = '.'
[number_format_th] string = ''
[number_format_point] int = '2'
[zero] string = '0.00'
[card_types] = array(12)
(
[0] = array(3)
(
[code] string = 'VISA'
[type] string = 'Visa'
[cvv2] string = '1'
)
[1] = array(3)
(
[code] string = 'MC'
[type] string = 'MasterCard'
[cvv2] string = '1'
)
[2] = array(3)
(
[code] string = 'AMEX'
[type] string = 'American Express'
[cvv2] string = '1'
)
[3] = array(3)
(
[code] string = 'DICL'
[type] string = 'Diners Club'
[cvv2] string = ''
)
[4] = array(3)
(
[code] string = 'JCB'
[type] string = 'JCB'
[cvv2] string = ''
)
[5] = array(3)
(
[code] string = 'CARTE'
[type] string = 'Carte Blanche'
[cvv2] string = ''
)
[6] = array(3)
(
[code] string = 'ABC'
[type] string = 'Australian BankCard'
[cvv2] string = ''
)
[7] = array(3)
(
[code] string = 'DINO'
[type] string = 'Discover/Novus'
[cvv2] string = ''
)
[8] = array(3)
(
[code] string = 'SW'
[type] string = 'Switch'
[cvv2] string = ''
)
[9] = array(3)
(
[code] string = 'SO'
[type] string = 'Solo'
[cvv2] string = ''
)
[10] = array(3)
(
[code] string = 'ERT'
[type] string = 'enRoute'
[cvv2] string = ''
)
[11] = array(3)
(
Code:
string = 'UKE' [type] string = 'Visa Electron' [cvv2] string = '1' ) ) [webmaster_mode] string = 'editor' [user_agent] string = 'ns' [PROXY_IP] string = '' [CLIENT_IP] string = '192.168.1.2' [REMOTE_ADDR] string = '192.168.1.2' [is_robot] string = 'N' [active_modules] = array(20) ( [Wishlist] bool = 'true' [Detailed_Product_Images] bool = 'true' [Wholesale_Trading] bool = 'true' [Discount_Coupons] bool = 'true' [Extra_Fields] bool = 'true' [Order_Tracking] bool = 'true' [Gift_Certificates] bool = 'true' [Product_Options] bool = 'true' [Upselling_Products] bool = 'true' [Advanced_Statistics] bool = 'true' [Bestsellers] bool = 'true' [Recommended_Products] bool = 'true' [Customer_Reviews] bool = 'true' [News_Management] bool = 'true' [Manufacturers] bool = 'true' [Fast_Lane_Checkout] bool = 'true' [HTML_Editor] bool = 'true' [Import_3x_4x] bool = 'true' [Special_Offers] bool = 'true' [Simple_Mode] bool = 'true' ) [config] = array(63) ( [Company] = array(16) ( [orders_department] string = 'orders@bebekisses.com' [support_department] string = 'help@bebekisses.com' [users_department] string = 'erika@bebekisses.com' [site_administrator] string = 'jay@bebekissses.com' [location_address] string = '' [location_city] string = '' [location_state] string = 'CA' [location_zipcode] string = '50001' [location_country] string = 'US' [company_name] string = 'bebe kisses' [company_website] string = 'www.bebekisses.com' [company_phone] string = '' [company_phone_2] string = '' [company_fax] string = '' [start_year] string = '2006' [end_year] string = '2006' ) [General] = array(35) ( [unlimited_products] string = 'N' [redirect_to_cart] string = 'Y' ... truncated

Thanks all.
__________________
http://www.tdg-i.com - A web Solutions Company
http://www.bebekisses.com
X-Cart Gold v4.1.4 Gold
- Custom AJAX Swatch color preview based on extjs
- Custom Layout

Managing: http://www.hotsutra.com (Not work safe) Adult toy store.
- Currently developing custom mods, to be disclosed once complete and deployed.


contact info: jgarcia at tdg-i.com
Reply With Quote
  #5  
Old 12-28-2006, 12:16 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Developer's doc??

Sorry I misunderstood your question.

Keep in mind that not all variables are global so you'll want to check a variable before using it globally.
Reply With Quote
  #6  
Old 01-01-2007, 03:40 PM
  bebekisses.com's Avatar 
bebekisses.com bebekisses.com is offline
 

Senior Member
  
Join Date: Dec 2006
Posts: 163
 

Default Re: Developer's doc??

Quote:
Originally Posted by Jon
Sorry I misunderstood your question.

Keep in mind that not all variables are global so you'll want to check a variable before using it globally.

Thanks! I just added a global variable to init because there are a million includes w/ this app, and being that there is little to no developer's documentation, I chose the path of least resistance.
__________________
http://www.tdg-i.com - A web Solutions Company
http://www.bebekisses.com
X-Cart Gold v4.1.4 Gold
- Custom AJAX Swatch color preview based on extjs
- Custom Layout

Managing: http://www.hotsutra.com (Not work safe) Adult toy store.
- Currently developing custom mods, to be disclosed once complete and deployed.


contact info: jgarcia at tdg-i.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 02:30 PM.

   

 
X-Cart forums © 2001-2020