Virtuemart Extensions from RuposTel

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

Sample Configuration

This is sample onepage.cfg.php for manual editting. It can also be fully generated by HTML configurator in Joomla

<?php
global $VM_LANG;


// please check your source code of your country list in your checkout and get exact virtuemart code for your country
// all incompatible shipping methods will be hiddin until customer choses other country
// this will also be preselected in registration and shipping forms
// Your shipping method cannot have 0 index ! Otherwise it will not be set as default
$default_shipping_country = "SVK";

$payment_info = array();
$payment_button = array();
/*
use:
$payment_info['payment_id'] = "After clicking the bottom button you will be redirected to PayPal site. Please return back with clicking Return to shop in Paypal"...
$payment_button['payment_id'] = "Proceed to PayPal.com terminal";
*/
$payment_info['7'] = $VM_LANG->_('ONEPAGE_PAYMENT_EXTRA_INFO_01');
$payment_button['7'] = $VM_LANG->_('ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_01');
$payment_info['4'] = $VM_LANG->_('ONEPAGE_PAYMENT_EXTRA_INFO_02');
$payment_button['4'] = $VM_LANG->_('ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_02');
// $payment_info['4'] = "Po kliknutí budete presmerovaný na portál PayPal";
// $payment_button['4'] = "Pokračovať do platobného terminálu PayPalu";

// default payment option id
// leave commented or 0 to let VM decide
$payment_default = 4;

// please set your order for not logged in users and for logged in users or leave default
// 1 is for shipping method
// 2 is for payment method
// 3 is for user form or user details inc. shipping address
// array (1,2,3) means that the first under basket is shipping method, than, payment method, them user registration form
// array (2,3,1) means that the first is payment method, then registration form and then shipping method selection
// if you don't need shipping address, then disable it in checkout steps in back end
// if you don't need shipping at all disable it in backed

// new from July 2010: order is set up in template file!
/*
$order_onepage_not_logged = array (2,3,1);
$order_onepage_logged = array(2,3,1);
*/

// set this to true if you don't accept other than valid EU VAT id
$must_have_valid_vat = true;
// set this to your input VAT id without _field at the end
$vat_input_id = "vm_vat";

// set this to false if you don't want to show full TOS
$show_full_tos = true;
// if you set show_full_tos, set this variable to one of theses:
// use one of these values:
// "shop.tos" to read tos from your VirtueMart configuration
// "25" if set to number it will search for article with this ID, extra lines will be removed automatically
// both will be shown without any formatting
$tos_config = "shop.tos";
//$tos_config = "shop.tos";



// css claass of submit button
// for most templates with variable width and height is 'button' ok,
// but if you don't have variable width and height anabled change this to anything else or empty
/*
// July 2010: moved to template file
$submit_btn_class = "button";
*/

// change this variable to your real css path of ">> Proceed to Checkout"
// let's hide "Proceed to checkout" by CSS
// if it doesn't work, change css path accordingly, i recommend Firefox Firebug to get the path
// but this works for most templates, but if you see "Proceed to checkout" link, contact me at This e-mail address is being protected from spambots. You need JavaScript enabled to view it
// for rt_mynxx_j15 template use '.cart-checkout-bar {display: none; }'
$style = '.checkout_link { display: none; } ';

/* list of style which will be overwritten in onepage.css in your template path
how it works: all the listed styles will be given prefix of onepage_ i.e. for sectiontableheader it will be given onepage_sectiontableheader
style classes are searched this way
1. search for class="yourstyle" case insensitively
2. change class=" to class="onepage_

list classes separated by comma in $op_classes
list of ids to be given prefix onepage_  ANY IDs WHICH END WITH _field WILL BE IGNORED AS THEY WOULD BRAKE YOUR CHECKOUT PROCESS
all spaces will be ignored

change of classes and ids will be done AFTER temlate processing

only generated code will be influenced. You can't change classes and ids outside scope of this component, such as menus and other modules

Examples:

$op_classes = "sectiontableheader, formField";
$op_ids = "company_input, company_div";
*/

$op_classes = "";
$op_ids = "";

/*
filename of css file to use for unlogged users if you want to override default styles
if not set, for basic functionality default.css in /components/com_virtuemart/themes/default/templates/onepage/onepage.css will be used
*/
$css_logged = "onepage.css";
$css_unlogged = "onepage.css";

// ALL THE REST ARE LANGUAGE VARIABLES, PLEASE COPY THEM TO YOUR /administrator/component/com_virtumart/languages/common/english.php or similarly
/*
Copy, paste and translate following lines into your language files
'ONEPAGE_SHIP_COUNTRY_CHANGED' => 'Please choose the right corier for selected country.',
'ONEPAGE_SHIP_COUNTRY_INVALID' => "We are sorry, but we don't ship to chosen country. Please select a different country or contact us by phone.",
'ONEPAGE_HTML_IN_BETWEEN_BASKET_AND_CHECKOUT' => "This text is be shown in between basket and one page checkout component. You can put any helpfull information here.",
'ONEPAGE_PAYMENT_EXTRA_DEFAULT_INFO' => 'Click the button below to confirm order.',
'ONEPAGE_ADD_USER_ERROR' => "Your user data were not saved. Most common reason is that you are probably already registered.  If so, please login via form on left. ",
'ONEPAGE_SAVE_ORDER_ERROR' => "Your order WAS NOT saved. Please fill all the required fields. If problem persists, please let us know by email. ",
'ONEPAGE_ORDER_TOTAL_INCL_SHIPPING' => "Order total incl. shipping: ",
'ONEPAGE_SHIPPING_ADDRESS' => 'Shipping address',
'ONEPAGE_SHIPPING_ADDRESS_IS_DIFFERENT' => "Shipping address is different from bill to address.",
'ONEPAGE_THANKYOU_ORDER_OK' => "Your order was sucessfully saved. Thank you for your purchase.",
'ONEPAGE_THANKYOU_ORDER_ERROR' => "Your order WAS NOT saved. Please contact us by email. ",
'ONEPAGE_THANKYOU_ORDER_OK_BUT_PAYMENT_BAD' => "Your order was saved, but there was a problem with payment. We will contact you soon.",
'ONEPAGE_THANKYOU_ORDER_OK_PAYMENT_OK' => "Your order and payment were saved. Thank you for your purchase.",
'ONEPAGE_PAYMENT_EXTRA_INFO_01' => "After clicking the button below you will be redirected to Tatra Banka which processes payments with credit cards. Please click on 'return to shop' after sucessfull payment.",
'ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_01' => 'Proceed to Tatra Banka online terminal',
'ONEPAGE_PAYMENT_EXTRA_INFO_02' => "After clicking the button below you will be redirected to PayPal. Please return to our shop after successfull payment. Click on 'return to shop' and don't use your browser navigation buttons. Thank you.",
'ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_02' => 'Proceed to PayPal.com to pay',
'ONEPAGE_PAYMENT_EXTRA_INFO_03' => "",
'ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_03' => '',
'ONEPAGE_PAYMENT_EXTRA_INFO_04' => "",
'ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_04' => '',
'ONEPAGE_PAYMENT_EXTRA_INFO_05' => "",
'ONEPAGE_PAYMENT_EXTRA_INFO_BUTTON_05' => '',
*/
//$ship_country_change_msg = "Vyberte spravneho dopravcu pre vybranu krajinu";
// "Please choose the right corier for selected country.";
$ship_country_change_msg = $VM_LANG->_('ONEPAGE_SHIP_COUNTRY_CHANGED');

//  "We are sorry, but we don't ship to chosen country. Please select a different country or contact us by phone.";
$ship_country_is_invalid_msg = $VM_LANG->_('ONEPAGE_SHIP_COUNTRY_INVALID');


// this is a default info message above "Confirm Order" Button
// Click on the Confirm Order button
// Click the button below to confirm order
$default_info_message = $VM_LANG->_(    'ONEPAGE_PAYMENT_EXTRA_DEFAULT_INFO');
// html in between basket and one page checkout
// if you modified your basket to show any additional info such as that users have to click on reload, or add products, this is the place
// "This text is be shown in between basket and one page checkout component. You can put any helpfull information here.";
$html_in_between = $VM_LANG->_('ONEPAGE_HTML_IN_BETWEEN_BASKET_AND_CHECKOUT');
// please change next message to:
// Your user data were not saved. Your email or username is probably already used.
// if you need to get your password, please use the form at the left side
// in case of problem, please let us know by phone or email at...
// $addusererr = 'Vaše indentifikačné údaje sa nepodarilo uložiť. Váš E-mail, alebo prihlasovacie meno už pravdepodobne existuje. Požiadajte o vygenerovanie nového hesla v ľavom menu v prípade, že ste zabudli Vaše heslo. V prípade problémov nás kontaktujte telefonicky.';
//"Your user data were not saved. Most common reason is that you are probably already registered.  If so, please login via form on left. ";
$addusererr = $VM_LANG->_('ONEPAGE_ADD_USER_ERROR');
// $addusererr = 'Vaše indentifikačné údaje sa nepodarilo uložiť. Váš E-mail, alebo prihlasovacie meno už pravdepodobne existuje. Požiadajte o vygenerovanie nového hesla v ľavom menu v prípade, že ste zabudli Vaše heslo. V prípade problémov nás kontaktujte telefonicky.';
// $addusererr = 'Din användardata sparades inte. Din e-post används troligen redan. Om ni behöver ett lösenord, var god och tryck på "Logga in" längst upp på sidan och därefter tryck på "Glömt Lösenordet?" på högersidan. Var god och kontakta oss om problem uppstår.';

// please change next message to:
// Order was NOT SAVED. Please fill all the required fields including shipping and payment method.
// In case of problems, please contact us by phone
//"Your order WAS NOT saved. Please fill all the required fields. If problem persists, please let us know by email. ";
$saveordererr = $VM_LANG->_('ONEPAGE_SAVE_ORDER_ERROR' );
//  $saveordererr = 'Vaša objednávka NEBOLA uložená. Vyplňte všetky potrebné údaje. V prípade problémov nás kontaktujte telefonicky.';
// $saveordererr = 'Er order har ej sparats. Var god och fyll in alla fälten även frakt och betalningsmetod. Var god och kontakta oss om problem uppstår.';

// change this to, but BEWARE apostrohies in text: Total incl. shipping:
$incship = $VM_LANG->_('ONEPAGE_ORDER_TOTAL_INCL_SHIPPING');
// $incship = "Totalpris inkl Frakt: ";



// Shipping address
$shippingtxt = $VM_LANG->_('ONEPAGE_SHIPPING_ADDRESS');
// $shippingtxt = "Fraktinformation";

//$chkship = "Shipping address is different from billing address ";
//$chkship = "Leverans adress är annan än fakturerings adress";
// $chkship = "Dodacia adresa je iná ako fakturačná adresa";
//"Shipping address is different from bill to address.";
$chkship =  $VM_LANG->_('ONEPAGE_SHIPPING_ADDRESS_IS_DIFFERENT');

// THIS WILL BE SHOWN AT THE THANK YOU PAGE:

// set the language variables
// set this to: your order was saved, thank you for shopping
// $msg1 = "Vaša objednávka bola zaevidovaná. Ďakujeme za Váš nákup.";
$msg1 =  $VM_LANG->_('ONEPAGE_THANKYOU_ORDER_OK');
// set this to: your order was NOT SAVED, please contact us by phone
// $msg2 = "Vaša objednávka NEBOLA zaevidovaná. Kontaktujte nás prosím telefonicky.";
$msg2 =   $VM_LANG->_('ONEPAGE_THANKYOU_ORDER_ERROR');
// set this to: your order was saved, but there was a problem with payment. We will contact you soon for more specific information.
$msg3 = $VM_LANG->_('ONEPAGE_THANKYOU_ORDER_OK_BUT_PAYMENT_BAD');
// $msg3 = "Vaša objednávka bola zaevidovaná, ale nastal problém s platbou. V blízkej dobe sa Vám budeme kontaktovať.";
// set his to: Your order and payment were OK. Thank you for your purchase
$msg4 = $VM_LANG->_('ONEPAGE_THANKYOU_ORDER_OK_PAYMENT_OK');
// $msg4 = "Vaša objednávka a platba bola zaevidovaná. Ďakujeme za Váš nákup a dôveru.";


// END OF CONFIGURATION

// the next lines will change apostrophies, so everything is ok in javascript
$ship_country_change_msg = addslashes($ship_country_change_msg);
$ship_country_is_invalid_msg = addslashes($ship_country_is_invalid_msg);


foreach ($payment_info as $ind => $p)
{
$payment_info[$ind] = addslashes($p);
}    

foreach ($payment_button as $ind => $p)
{
$payment_button[$ind] = addslashes($p);
}

$default_info_message = addslashes($default_info_message);
$incship = addslashes($incship);

?>

// END OF CONFIGURATION

// the next lines will change apostrophies, so everything is ok in javascript
$ship_country_change_msg = addslashes($ship_country_change_msg);
$ship_country_is_invalid_msg = addslashes($ship_country_is_invalid_msg);


foreach ($payment_info as $ind => $p)
{
$payment_info[$ind] = addslashes($p);
}   

foreach ($payment_button as $ind => $p)
{
$payment_button[$ind] = addslashes($p);
}

$default_info_message = addslashes($default_info_message);
$incship = addslashes($incship);

?>

Add comment

Please comment only to the topic of the article. For any other support topics please use our forum or contact form.


Security code
Refresh

You are here