X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Where are all the PHP variables and their values stored? (https://forum.x-cart.com/showthread.php?t=31034)

Libai 05-09-2007 04:22 AM

Where are all the PHP variables and their values stored?
 
I'm a newbee to Smarty and I've spent half a day trying to figure it out but still can't. This is the question that disturbs me the most: Where are all the PHP variables and their values stored?

For example, if I want to remove 'default' sorting feature for products sorting, I know I should find an array called 'sort_fields' and remove 'default' from that array, I just don't know where to find it. Would somebody please help me with this?

Also I don't know where to find all the variables. Like I know that for the telephone numbers the variables are '$config.Company.company_phone' and '$config.Company.company_phone_2', just don't know how to insert the company's email address?? I found it by accident that it should be '$config.Company.site_administrator', but I really want to know a proper way to find it. In which file are these variables stored?

Thanks very much!!

balinor 05-09-2007 04:33 AM

Re: Where are all the PHP variables and their values stored?
 
Hi Libai, I can sense your frustration, but you have now asked this question in three different threads. I have removed the original post on this topic. Per the forum guidelines, cross posting is not permitted. You have to remember that this forum is run by the users of X-Cart, so you may need to wait a few days to get a response. If you are not getting a response to your questions here in the forum, your best bet is to use some support points and post the question in your help desk area.

The first thing to do is search the forum thoroughly. You'll find that the sort fields are contained in include/search.php. You can remove the default by commenting out or removing this bit of code:

"orderby" => func_get_langvar_by_name("lbl_default")

As to the config variables, you shouldn't need to edit those manually as you enter them in your Company Information section in General Settings.

Hope this points you in the right direction!

carpeperdiem 05-09-2007 05:42 AM

Re: Where are all the PHP variables and their values stored?
 
Can I assume that you know about the debugging console? This thread helped me!

inebriate 05-09-2007 12:57 PM

Re: Where are all the PHP variables and their values stored?
 
im assuming you want config variables rather than php variables (php variables have a scope in which you can use them) when reading your post


here are all the config variables (the variables come from the admin and i think the provider section as well im not sure) for 4.1.6 (4.x should work for the most part as well)



Code:

name        value        category



acct_coupon_discount        Sales:Coupon Discount        QuickBooks
acct_discount        Sales:Discount        QuickBooks
acct_gc        Sales:Gift Certificate        QuickBooks
acct_gc_discount        Sales:Gift Certificate Discount        QuickBooks
acct_inv_asset        Inventory Asset        QuickBooks
acct_inv_cogs        Cost of Goods Sold        QuickBooks
acct_product        Sales:Product        QuickBooks
acct_shipping        Sales:Shipping        QuickBooks
acct_tax        Website:Tax        QuickBooks
active_subscriptions_processor                   
add2wl_unlogged_user        Y        Wishlist
additional_fields                  User_Profiles
admin_sqlerror_notify        N        Email_Note
allow_auto_create_categories        Y        Import_3x_4x
allow_customer_select_tpl        Y        Gift_Certificates
allow_ips                  Security
allow_search_by_words        Y        General
allow_update_quantity_in_cart        Y        Appearance
allow_user_modify_tax_number        N        Taxes
alter_currency_rate        0.87        General
alter_currency_symbol        €        General
anti_fraud_license                  Anti_Fraud
anti_fraud_limit        5        Anti_Fraud
anti_fraud_order_limit        500        Anti_Fraud
apply_default_country        N        General
ARB_account                  Shipping
ARB_id                  Shipping
ARB_password                  Shipping
ARB_shipping_key                  Shipping
ARB_shipping_key_intl                  Shipping
ARB_testmode        Y        Shipping
bestsellers_menu        Y        Bestsellers
bestsellers_thumbnails        Y        Bestsellers
blowfish_enabled        N        Security
buynow_button_enabled        Y        Appearance
buynow_with_options_enabled        N        Product_Options
card_types        a:12:{i:0;a:3:{s:4:"code";s:4:"VISA";s:4:"type";s:...         
check_cc_number        N        General
check_zero_order        Y        Anti_Fraud
cmpi_currency        USD        CMPI
cmpi_enabled        N        CMPI
cmpi_merchantid                  CMPI
cmpi_proseccorid                  CMPI
cmpi_url        https://centineltest.cardinalcommerce.com:443/maps...        CMPI
company_fax        1-800-555-5555        Company
company_name        Your Company Name        Company
company_phone        1-800-555-5555        Company
company_phone_2        500-555-5555        Company
company_website        www.x-cart.com        Company
compiled_tpl_check_md5        Y        Security
contact_us_fields                  Contact_Us
count_products        Y        Appearance
CPC_merchant_id                  Shipping
crypt_method                  Security
currency_symbol        $        General
customer_reviews        Y        Customer_Reviews
customer_voting        Y        Customer_Reviews
data_cache_expiration        1178703807         
date_format        %d-%m-%Y        Appearance
db_backup_date                   
default_admin_language        US         
default_city        New York        General
default_country        US        General
default_customer_language        US         
default_giftcert_template        template_default.tpl        Gift_Certificates
default_pwd        Y        General
default_state        NY        General
default_zipcode        10001        General
det_image_popup        N        Detailed_Product_Images
det_image_popup_js_based        N        Detailed_Product_Images
disabled_languages                   
disable_anonymous_checkout        N        General
disable_cc        Y        General
disable_outofstock_products        N        General
disable_shipping        Y        Shipping
disallowed_file_exts        phtml, php3, php, pl, cgi, asp, exe, com, bat, pif...        Security
display_cart_products_tax_rates        N        Taxes
display_productcode_in_list        N        Appearance
display_shipping_cost        Y        Appearance
display_taxed_order_totals        N        Taxes
dont_leave_https        Y        Security
download_key_ttl        24        Egoods
dynamic_save_money_enabled        Y        Product_Options
egoods_manual_cc_processing        N        Egoods
email_addresses                  Logging
eml_af_sk_expire        Y        Anti_Fraud
eml_af_sk_invalid        Y        Anti_Fraud
eml_giftcert_notif_admin        Y        Gift_Certificates
eml_giftcert_notif_purchaser        Y        Gift_Certificates
eml_login_error        Y        Email_Note
eml_lowlimit_warning        Y        Email_Note
eml_lowlimit_warning_provider        Y        Email_Note
eml_newsletter_subscribe        Y        News_Management
eml_newsletter_subscribe_admin        Y        News_Management
eml_newsletter_unsubscr        Y        News_Management
eml_newsletter_unsubscr_admin        Y        News_Management
eml_order_c_notif_customer        Y        Email_Note
eml_order_d_notif_customer        Y        Email_Note
eml_order_p_notif_admin        Y        Email_Note
eml_order_p_notif_customer        Y        Email_Note
name        value        category
eml_order_p_notif_provider        Y        Email_Note
eml_profile_deleted        Y        Email_Note
eml_profile_deleted_admin        Y        Email_Note
eml_profile_modified_admin        Y        Email_Note
eml_profile_modified_customer        Y        Email_Note
eml_recurring_notification        Y        Subscriptions
eml_signin_notif        Y        Email_Note
eml_signin_notif_admin        Y        Email_Note
enabled_printable_version        Y        Appearance
enablePostMailGC        Y        Gift_Certificates
enable_all_shippings        N        Shipping
enable_debug_console        N        General
enable_init_order_notif        N        Email_Note
enable_init_order_notif_customer        N        Email_Note
enable_manual_cc_cvv2        Y        General
enable_order_notif        Y        Email_Note
enable_shop_statistics        Y        Advanced_Statistics
enable_tracking_statistics        N        Advanced_Statistics
enable_user_tax_exemption        N        Taxes
export_invitems        Y        QuickBooks
extra_fields_limit        10        Extra_Fields
featured_only_multicolumn        N        Appearance
FEDEX_account_number                  Shipping
FEDEX_integration_type                   
FEDEX_meter_number                   
FEDEX_test_server        Y        Shipping
fields_status                  User_Profiles
froogle_currency        USD        Froogle
froogle_expiration_date        1        Froogle
froogle_password                  Froogle
froogle_payment_accepted                  Froogle
froogle_payment_notes                  Froogle
froogle_used_https_links        N        Froogle
froogle_username                  Froogle
gcheckout_check_avs        Y        Google_Checkout
gcheckout_check_cvn        M        Google_Checkout
gcheckout_check_prot        Y        Google_Checkout
gcheckout_default_shipping_cost        0.00        Google_Checkout
gcheckout_disable_customer_notif        Y        Google_Checkout
gcheckout_display_product_note        N        Google_Checkout
gcheckout_merchant_calc        Y        Google_Checkout
gcheckout_mid                  Google_Checkout
gcheckout_mkey                  Google_Checkout
gcheckout_test_mode        Y        Google_Checkout
gc_blocking_period        120        Gift_Certificates
gc_show_expired        Y        Gift_Certificates
gpg_home_dir                  Security
gpg_key                  Security
gpg_prog        /usr/local/bin/gpg        Security
gpg_public_key                  Security
html_catalog_dirs                   
html_mail        Y        Email
httpsmod        libcurl        General
https_proxy                  General


inebriate 05-09-2007 12:59 PM

Re: Where are all the PHP variables and their values stored?
 
Code:

include_meta_categories        Y        SEO
include_meta_products        Y        SEO
interneka_id                  Interneka
interneka_per_lead        Y        Interneka
interneka_per_sale        Y        Interneka
intershipper_password                  Shipping
intershipper_username                  Shipping
location_address        Test address        Company
location_city        Test city        Company
location_country        US        Company
location_state        CA        Company
location_zipcode        50001        Company
log_bench_reports        N        Logging
log_database        N        Logging
log_debug_messages        N        Logging
log_decrypt_errors        N        Logging
log_file_operations        N        Logging
log_orders_change_status        N        Logging
log_orders_delete        N        Logging
log_orders_export        N        Logging
log_payment_processing_errors        N        Logging
log_products_delete        N        Logging
log_shipping_errors        N        Logging
manufacturers_limit        10        Manufacturers
manufacturers_menu        Y        Manufacturers
manufacturers_per_page        25        Manufacturers
maximum_order_amount        0        General
maximum_order_items        0        General
max_gc_amount                  Gift_Certificates
max_nav_pages        10        Appearance
max_select_quantity        50        Appearance
max_truncate        30        Email
membership_signup        Y        General
meta_descr        X-Cart: full-featured PHP/MySQL shopping cart soft...        SEO
meta_keywords        x-cart, xcart, cart, shopping cart, php, php4, mys...        SEO
minimal_order_amount        10        General
min_gc_amount        10        Gift_Certificates
newsletter_email                  News_Management
newsletter_limit        30        News_Management
news_emails_per_pass        0        News_Management
news_sleep_interval        0        News_Management
number_format        2.        Appearance
number_of_bestsellers        5        Bestsellers
number_of_recommends        10        Recommended_Products
orders_department                  Company
orders_per_page_admin        30        Appearance
name        value        category
page_title_format        A        SEO
page_title_limit        30        SEO
parse_smarty_tags        N        General
paypal_solution        ipn         
periodic_last_time        0         
periodic_logs                  Maintenance_Agent
periodic_mode                  Maintenance_Agent
periodic_orders        Y        Maintenance_Agent
periodic_type                  Maintenance_Agent
periodic_visits        Y        Maintenance_Agent
perl_binary                  General
pgp_home_dir                  Security
pgp_key                  Security
pgp_prog        /usr/local/bin/pgp        Security
pgp_public_key                  Security
ppm_gateway_data        WC1DYXJ0IENvcHlyaWdodCAoYykgMjAwMS0yMDA0IFJ1c2xhbi...         
print_giftcerts_separated        N        Gift_Certificates
print_orders_separated        N        Appearance
products_order        orderby        Appearance
products_per_page        10        Appearance
products_per_page_admin        30        Appearance
products_per_row                  Appearance
qb_exportpayments        Y        QuickBooks
qb_order_prefix                  QuickBooks
qb_reporderpoint        0        QuickBooks
realtime_shipping        N        Shipping
redirect_to_cart        Y        General
replace_shipping_with_freight        N        Shipping
restore_language_interface        N        Appearance
return_to_dynamic_part        N        General
root_categories        Y        General
safe_distance        350        Anti_Fraud
search_products_category        Y        Search_products
search_products_manufacturers        Y        Search_products
search_products_price        Y        Search_products
search_products_quantity        N        Search_products
search_products_sku        Y        Search_products
search_products_weight        Y        Search_products
select_recommends_list_randomly        Y        Recommended_Products
send_notifications_to_provider        Y        Email_Note
send_to_friend_enabled        Y        Appearance
shop_closed        N        General
shop_closed_key                  General
show_cart_details        N        Appearance
show_cc_info        N        Email
show_in_stock        Y        Appearance
show_passwords_in_notifications        Y        Email
show_thumbnails        Y        Appearance
site_administrator                  Company
slist_cancel_proxy_anonymous        Y        Stop_List
slist_failed_transaction_limit        10        Stop_List
slist_fast_order_number        5        Stop_List
slist_fast_order_time        30        Stop_List
slist_max_transaction        10        Stop_List
slist_P_check_enabled        Y        Stop_List
slist_sess_failed_trans_limit        10        Stop_List
snapshots        a:1:{i:0;a:2:{s:4:"time";i:1178153575;s:5:"descr";...         
sns_collector_path_url_http                  SnS_connector
sns_collector_path_url_https                  SnS_connector
sns_display_button        Y        SnS_connector
sns_passphrase                  SnS_connector
sns_script_extension        php        SnS_connector
sns_shop_display_name        Test        SnS_connector
spambot_arrest_image_length        5        Image_Verification
spambot_arrest_img_generator        default        Image_Verification
spambot_arrest_on_contact_us        Y        Image_Verification
spambot_arrest_on_login        Y        Image_Verification
spambot_arrest_on_registration        N        Image_Verification
spambot_arrest_on_reviews        Y        Image_Verification
spambot_arrest_on_send_to_friend        N        Image_Verification
spambot_arrest_str_generator        numbers        Image_Verification
speed_bar        a:3:{i:0;a:5:{s:2:"id";s:1:"1";s:7:"orderby";i:10;...         
start_year        2005        Company
subscriptions_key                  Subscriptions
support_department                  Company
thumbnail_width        125        Appearance
timezone_offset        0        Appearance
time_format        %H:%M:%S        Appearance
trans_class        Website:Retail        QuickBooks
uk_oriented_ccinfo        N        General
unallowed_request_notify        N        Email_Note
unlimited_products        N        General
upgrade_history                   
upselling_new_window        N        Upselling_Products
UPS_accesskey                  UPS_OnLine_Tools
UPS_password                  UPS_OnLine_Tools
UPS_username                  UPS_OnLine_Tools
users_department                  Company
users_per_page_admin        30        Appearance
use_base64_headers        N        Email
use_counties        N        General
use_https_login        N        Security
use_intershipper        N        Shipping
use_js_states        Y        General
use_pgp6        N        Security
use_PHP_mailer        Y        Email
use_secure_login_page        N        Security
usps_image_type        TIF        Shipping_Label_Generator
USPS_password                  Shipping
usps_sample_mode        Y        Shipping_Label_Generator
name        value        category
USPS_servername                  Shipping
usps_userid                  Shipping_Label_Generator
USPS_username                  Shipping
version        4.1.6         
weight_symbol        lbs        General
weight_symbol_grams        453.6        General
writing_reviews        A        Customer_Reviews


those with 3 values are listed by: name - default value - category
those with 2 values are listed by: name - category

in order to reference them in smarty you would type (make sure to match the caps):
{$config.category.name}
ie: if you wanted the company name you would type {$config.Company.company_name}


you can find all this info in your sql database under xcart_config or just run "SELECT name , value , category FROM xcart_config WHERE type != 'separator' ORDER BY `xcart_config` . `name` ASC LIMIT 0, 500 ; " and export to a pdf for an organized table view

Libai 05-10-2007 12:38 AM

Re: Where are all the PHP variables and their values stored?
 
Sorry I had asked similar questions on more than one post, however each time I asked I added some new questions though :) Anyway I'll be careful next time, many apologies! I had also searched the forum but couldn't find my answers... Anyway, thank you very much for your help, balinor. And carpeperdiem, that thread is very helpful too. inebriate, you're a life saver. Thank you all.


All times are GMT -8. The time now is 11:17 AM.

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