function showInterface()
 {
     global $pInfo;
     if (MODULE_SHIPPING_FREIGHTQUOTE_STATUS != 'True') {
         return false;
     }
     $template = array('TITLE' => TEXT_PRODUCTS_FREIGHTQUOTE, 'LABEL_ENABLE' => TEXT_PRODUCTS_FREIGHTQUOTE_ENABLE, 'LABEL_CLASS' => TEXT_PRODUCTS_FREIGHTQUOTE_CLASS, 'LABEL_DIMENSIONS' => TEXT_PRODUCTS_FREIGHTQUOTE_DIMENSIONS, 'LABEL_NMFC' => TEXT_PRODUCTS_FREIGHTQUOTE_NMFC, 'LABEL_HZMT' => TEXT_PRODUCTS_FREIGHTQUOTE_HZMT, 'LABEL_COMMODITY_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_COMMODITY_TYPE, 'LABEL_PACKAGE_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_PACKAGE_TYPE, 'LABEL_CONTENT_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_CONTENT_TYPE);
     $boolean_dropdown = array(array('id' => 'true', 'text' => 'True'), array('id' => 'false', 'text' => 'False'));
     $classes = array(array('id' => '50', 'text' => '50'), array('id' => '55', 'text' => '55'), array('id' => '60', 'text' => '60'), array('id' => '65', 'text' => '65'), array('id' => '70', 'text' => '70'), array('id' => '77.5', 'text' => '77.5'), array('id' => '85', 'text' => '85'), array('id' => '92.5', 'text' => '92.5'), array('id' => '100', 'text' => '100'), array('id' => '110', 'text' => '110'), array('id' => '125', 'text' => '125'), array('id' => '150', 'text' => '150'), array('id' => '175', 'text' => '175'), array('id' => '200', 'text' => '200'), array('id' => '250', 'text' => '250'), array('id' => '300', 'text' => '300'), array('id' => '400', 'text' => '400'), array('id' => '500', 'text' => '500'));
     $packages = array(array('id' => 'Bags', 'text' => 'Bags'), array('id' => 'Bales', 'text' => 'Bales'), array('id' => 'Boxes', 'text' => 'Boxes'), array('id' => 'Bundles', 'text' => 'Bundles'), array('id' => 'Carpets', 'text' => 'Carpets'), array('id' => 'Coils', 'text' => 'Coils'), array('id' => 'Crates', 'text' => 'Crates'), array('id' => 'Cylinders', 'text' => 'Cylinders'), array('id' => 'Drums', 'text' => 'Drums'), array('id' => 'Pails', 'text' => 'Pails'), array('id' => 'Reels', 'text' => 'Reels'), array('id' => 'Rolls', 'text' => 'Rolls'), array('id' => 'TubesPipes', 'text' => 'Tubes/Pipes'), array('id' => 'Motorcycle', 'text' => 'Motorcycle'), array('id' => 'ATV', 'text' => 'ATV'), array('id' => 'Pallets_48x40', 'text' => 'Pallets 48x40'), array('id' => 'Pallets_other', 'text' => 'Pallets Other'), array('id' => 'Pallets_120x120', 'text' => 'Pallets 120x120'), array('id' => 'Pallets_120x100', 'text' => 'Pallets 120x100'), array('id' => 'Pallets_120x80', 'text' => 'Pallets 120x80'), array('id' => 'Pallets_europe', 'text' => 'Pallets Europe'), array('id' => 'Pallets_48x48', 'text' => 'Pallets 48x48'), array('id' => 'Pallets_60x48', 'text' => 'Pallets 60x48'));
     $commodities = array(array('id' => 'GeneralMerchandise', 'text' => 'General Merchandise'), array('id' => 'Machinery', 'text' => 'Machinery'), array('id' => 'HouseholdGoods', 'text' => 'Household Goods'), array('id' => 'FragileGoods', 'text' => 'Fragile Goods'), array('id' => 'ComputerHardware', 'text' => 'Computer Hardware'), array('id' => 'BottledProducts', 'text' => 'Bottled Products'), array('id' => 'BottleBeverages', 'text' => 'Bottle Beverages'), array('id' => 'NonPerishableFood', 'text' => 'Non Perishable Food'), array('id' => 'SteelSheet', 'text' => 'Steel Sheet'), array('id' => 'BrandedGoods', 'text' => 'Branded Goods'), array('id' => 'PrecisionInstruments', 'text' => 'Precision Instruments'), array('id' => 'ChemicalsHazardous', 'text' => 'Chemicals Hazardous'), array('id' => 'FineArt', 'text' => 'Fine Art'), array('id' => 'Automobiles', 'text' => 'Automobiles'), array('id' => 'CellPhones', 'text' => 'Cell Phones'), array('id' => 'NewMachinery', 'text' => 'New Machinery'), array('id' => 'UsedMachinery', 'text' => 'Used Machinery'), array('id' => 'HotTubs', 'text' => 'Hot Tubs'));
     $contents = array(array('id' => 'NewCommercialGoods', 'text' => 'New Commercial Goods'), array('id' => 'UsedCommercialGoods', 'text' => 'Used Commercial Goods'), array('id' => 'HouseholdGoods', 'text' => 'Household Goods'), array('id' => 'FragileGoods', 'text' => 'Fragile Goods'), array('id' => 'Automobile', 'text' => 'Automobile'), array('id' => 'Motorcycle', 'text' => 'Motorcycle'), array('id' => 'AutoOrMotorcycle', 'text' => 'Auto or Motorcycle'));
     $template['DROPDOWN_CLASS'] = tep_draw_pull_down_menu('products_freightquote_class', $classes, $pInfo->products_freightquote_class);
     $template['FIELD_ENABLE'] = tep_draw_checkbox_field('products_freightquote_enable', '1', $pInfo->products_freightquote_enable == '1' ? true : false);
     $template['FIELDS_DIMENSIONS'] = tep_draw_input_field('products_freightquote_length', $pInfo->products_freightquote_length, 'maxlength=3 style="width:50px"') . 'L x ' . tep_draw_input_field('products_freightquote_width', $pInfo->products_freightquote_width, 'maxlength=3 style="width:50px"') . 'W x ' . tep_draw_input_field('products_freightquote_height', $pInfo->products_freightquote_height, 'maxlength=3 style="width:50px"') . 'H';
     $template['FIELD_NMFC'] = tep_draw_input_field('products_freightquote_nmfc', $pInfo->products_freightquote_nmfc, 'maxlength=100');
     $template['DROPDOWN_HZMT'] = tep_draw_pull_down_menu('products_freightquote_hzmt', $boolean_dropdown, $pInfo->products_freightquote_hzmt == 'true' ? 'true' : 'false');
     $template['DROPDOWN_PACKAGE_TYPES'] = tep_draw_pull_down_menu('products_freightquote_package_type', $packages, $pInfo->products_freightquote_package_type);
     $template['DROPDOWN_COMMODITY_TYPES'] = tep_draw_pull_down_menu('products_freightquote_commodity_type', $commodities, $pInfo->products_freightquote_commodity_type);
     $template['DROPDOWN_CONTENT_TYPES'] = tep_draw_pull_down_menu('products_freightquote_content_type', $contents, $pInfo->products_freightquote_content_type);
     $template_file = file_get_contents($this->fqDirectory . 'freightquote_interface.tpl');
     foreach ($template as $key => $val) {
         $template_file = str_replace($key, $val, $template_file);
     }
     echo $template_file;
 }
 function getData()
 {
     global $PHP_SELF, $HTTP_GET_VARS;
     // Display the button
     $content = tep_draw_form('skroutz_easy', tep_href_link('skroutz.php', '', 'NONSSL', false), 'post') . '<div align="center">' . tep_image(DIR_WS_IMAGES . $this->logo, $this->title) . '</div>' . '<div style="margin: 5px 0">' . $this->description . '.</div>' . $this->list_header . ':' . '<ul style="margin: 0 0 0.5em 2em; padding-left: 0">' . '  <li>' . $this->list_item1 . '</li>' . '  <li>' . $this->list_item2 . '</li>' . '  <li>' . $this->list_item3 . '</li>' . '</ul>' . '<div align="center"><a href="http://www.skroutz.gr/easy" style="color: #F68B24">' . $this->more . '</a></div>' . tep_draw_input_field('submit', $this->button, 'style="width: 100%; word-wrap: break-word"', 'submit') . '</form>';
     return $content;
 }
Пример #3
0
 function selection()
 {
     $selection = array('id' => $this->code, 'module' => $this->title, 'description' => $this->description);
     if (SHOP_ID == 14 || SHOP_ID == 16) {
         $selection['fields'] = array(array('title' => MODULE_PAYMENT_BANK_CORPORATE_PURCHASE_ORDER, 'field' => tep_draw_input_field('purchase_order', '', 'size="10" maxlength="20"')));
     }
     return $selection;
 }
 function execute()
 {
     global $request_type, $oscTemplate;
     $form_output = '    ' . tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get') . '    <div class="input-group">' . '    ' . tep_draw_input_field('keywords', '', 'required placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"', 'search') . '      <span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button></span>' . '    </div>' . tep_draw_hidden_field('search_in_description', '0') . tep_hide_session_id() . '    </form>';
     ob_start();
     include DIR_WS_MODULES . 'boxes/templates/search.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
Пример #5
0
 function execute()
 {
     global $request_type, $oscTemplate;
     if ($this->group == 'boxes_header') {
         $data = '<div class="col-sm-6">' . tep_navbar_search('btn-info', false) . '</div>';
     } else {
         $data = '<div class="panel panel-default">' . '  <div class="panel-heading">' . MODULE_BOXES_SEARCH_BOX_TITLE . '</div>' . '  <div class="panel-body text-center">' . '    ' . tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get') . '    <div class="input-group">' . '    ' . tep_draw_input_field('keywords', '', 'required placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"') . '      <span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="glyphicon glyphicon-search"></i></button></span>' . '    </div>' . tep_draw_hidden_field('search_in_description', '0') . tep_hide_session_id() . '<br />' . MODULE_BOXES_SEARCH_BOX_TEXT . '<br /><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><strong>' . MODULE_BOXES_SEARCH_BOX_ADVANCED_SEARCH . '</strong></a>' . '    </form>' . '  </div>' . '</div>';
     }
     $oscTemplate->addBlock($data, $this->group);
 }
 function selection()
 {
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->public_title, 'fields' => array(array('title' => MODULE_PAYMENT_PAYPAL_PAYFLOW_PRO_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('paypal_payflow_pro_number')), array('title' => MODULE_PAYMENT_PAYPAL_PAYFLOW_PRO_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('paypal_payflow_pro_expires_month', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('paypal_payflow_pro_expires_year', $expires_year)), array('title' => MODULE_PAYMENT_PAYPAL_PAYFLOW_PRO_TEXT_CREDIT_CARD_CVV2, 'field' => tep_draw_input_field('paypal_payflow_pro_cvv2', '', 'size="4"'))));
     return $selection;
 }
Пример #7
0
 function selection()
 {
     $selection = array('id' => $this->code, 'module' => $this->title, 'description' => $this->description);
     $selection['fields'] = array();
     if (tep_not_null(MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE)) {
         $selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE, 'field' => tep_draw_radio_field('check_account_type', 'Checking', true) . MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE_CHECKING . '<br />' . "\n" . tep_draw_radio_field('check_account_type', 'Savings') . MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE_SAVINGS);
     }
     $selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_BANK_NAME, 'field' => tep_draw_input_field('check_bank_name'));
     $selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_ROUTING_NUMBER, 'field' => tep_draw_input_field('check_routing_number') . ' ' . MODULE_PAYMENT_CHEQUE_ROUTING_NUMBER_TEXT);
     $selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_ACCOUNT_NUMBER, 'field' => tep_draw_input_field('check_account_number') . ' ' . MODULE_PAYMENT_CHEQUE_ACCOUNT_NUMBER_TEXT);
     return $selection;
 }
Пример #8
0
 function selection()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('ipayment_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('ipayment_cc_number')), array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('ipayment_cc_expires_month', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('ipayment_cc_expires_year', $expires_year)), array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_CHECKNUMBER, 'field' => tep_draw_input_field('ipayment_cc_checkcode', '', 'size="4" maxlength="3"') . '&nbsp;<small>' . MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_CHECKNUMBER_LOCATION . '</small>')));
     return $selection;
 }
Пример #9
0
 function confirmation()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $confirmation = array('fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('cc_number_nh-dns')), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('cc_expires_year', $expires_year)), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_CVC, 'field' => tep_draw_input_field('cc_cvc_nh-dns', '', 'size="5" maxlength="4"'))));
     return $confirmation;
 }
 function credit_selection()
 {
     global $customer_id, $currencies, $language;
     $selection_string = '';
     $selection_string .= '<tr>' . "\n";
     //$selection_string .= ' <td width="10"></td>';
     $selection_string .= ' <td class="main">' . "\n";
     $selection_string .= TEXT_ENTER_COUPON_CODE . '<br>' . tep_draw_input_field('gv_redeem_code') . '</td>';
     $selection_string .= ' <td align="right"> </td>';
     //$selection_string .= ' <td width="10"></td>';
     $selection_string .= '</tr>' . "\n";
     return $selection_string;
 }
Пример #11
0
 function selection()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('intensepay_cc_name', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('intensepay_cc_num')), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('intensepay_cc_exp_mon', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('intensepay_cc_exp_year', $expires_year)), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2, 'field' => tep_draw_input_field('intensepay_cc_cvv2', '', 'style="width:40px" maxlength="4"'))));
     return $selection;
 }
Пример #12
0
 function getAdminPricing()
 {
     global $pInfo;
     $content = '<tr bgcolor="#ebebff">';
     $content .= '<td class="main">' . TEXT_PRODUCTS_PRICE_NET . '</td>';
     $content .= '<td class="main">' . tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"') . '</td>';
     $content .= '</tr>';
     $content .= '<tr bgcolor="#ebebff">';
     $content .= '<td class="main">' . TEXT_PRODUCTS_PRICE_GROSS . '</td>';
     $content .= '<td class="main">' . tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"') . '</td>';
     $content .= '</tr>';
     return $content;
 }
Пример #13
0
 function credit_selection()
 {
     global $customer_id, $currencies, $language;
     // START Checkout Display Fix by BTBlomberg
     $selection_string = '<tr><td></td><td class="main">';
     $selection_string .= tep_draw_form('checkout_payment_gift', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post');
     $selection_string .= '<div><br /> ';
     $selection_string .= Translate('Enter Redeem Code') . tep_draw_input_field('gv_redeem_code', 'redeem code');
     $selection_string .= ' ';
     $selection_string .= tep_image_submit('button_redeem.gif', Translate('Apply Coupon Code'), 'onclick="return submitFunction()"');
     $selection_string .= '</div><br /></form></td></tr>';
     // END Checkout Display Fix by BTBlomberg
     return $selection_string;
 }
Пример #14
0
 function credit_selection()
 {
     global $customer_id, $currencies, $language;
     $selection_string = '';
     $selection_string .= '' . "\n";
     $selection_string .= ' <tr><td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td><td>' . "\n";
     $selection_string .= '<table border="0" cellpadding="5"><tr><td class="main">' . TEXT_ENTER_GV_CODE . tep_draw_input_field('gv_redeem_code') . ' and click ';
     $image_submit = '<input type="image" name="submit_redeem" onClick="return submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" class="contbutton" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';
     $selection_string .= '';
     $selection_string .= '</td><td>' . $image_submit . '</td></tr></table></td><td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td></tr>';
     $selection_string .= '';
     $selection_string .= '' . "\n";
     return $selection_string;
 }
 function execute()
 {
     global $oscTemplate, $request_type;
     $content_width = MODULE_CONTENT_HEADER_SEARCH_CONTENT_WIDTH;
     $search_box = '<div class="searchbox-margin">';
     $search_box .= tep_draw_form('quick_find', tep_href_link('advanced_search_result.php', '', $request_type, false), 'get', 'class="form-horizontal"');
     $search_box .= '  <div class="input-group">' . tep_draw_input_field('keywords', '', 'required placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"', 'search') . '<span class="input-group-btn"><button type="submit" class="btn btn-info"><i class="fa fa-search"></i></button></span>' . '  </div>';
     $search_box .= tep_hide_session_id() . '</form>';
     $search_box .= '</div>';
     ob_start();
     include 'includes/modules/content/' . $this->group . '/templates/search.php';
     $template = ob_get_clean();
     $oscTemplate->addContent($template, $this->group);
 }
Пример #16
0
 function credit_selection()
 {
     global $customer_id, $currencies, $language;
     $selection_string = '';
     $selection_string .= '<tr>' . "\n";
     $selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
     $selection_string .= ' <td class="main">' . "\n";
     $image_submit = '<input type="image" name="submit_redeem" onClick="submitFunction()" src="' . DIR_WS_LANGUAGES . $language . '/images/buttons/button_redeem.gif" border="0" alt="' . IMAGE_REDEEM_VOUCHER . '" title = "' . IMAGE_REDEEM_VOUCHER . '">';
     $selection_string .= TEXT_ENTER_COUPON_CODE . tep_draw_input_field('gv_redeem_code') . '</td>';
     $selection_string .= ' <td align="right">' . $image_submit . '</td>';
     $selection_string .= ' <td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
     $selection_string .= '</tr>' . "\n";
     return $selection_string;
 }
Пример #17
0
 function selection()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B - (%m)', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $onFocus = 'onfocus="methodSelect(\'pmt-' . $this->code . '\')"';
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_VELOCITY_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('velocity_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'id="' . $this->code . '-cc-owner"' . $onFocus . ' autocomplete="off"'), 'tag' => $this->code . '-cc-owner'), array('title' => MODULE_PAYMENT_VELOCITY_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('velocity_cc_number', '', 'id="' . $this->code . '-cc-number"' . $onFocus . ' autocomplete="off"'), 'tag' => $this->code . '-cc-number'), array('title' => MODULE_PAYMENT_VELOCITY_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('velocity_cc_expires_month', $expires_month, strftime('%m'), 'id="' . $this->code . '-cc-expires-month"' . $onFocus) . '&nbsp;' . tep_draw_pull_down_menu('velocity_cc_expires_year', $expires_year, '', 'id="' . $this->code . '-cc-expires-year"' . $onFocus), 'tag' => $this->code . '-cc-expires-month'), array('title' => MODULE_PAYMENT_VELOCITY_TEXT_CVV, 'field' => tep_draw_password_field('velocity_cc_cvv', '', 'size="4" maxlength="4"' . ' id="' . $this->code . '-cc-cvv"' . $onFocus . ' autocomplete="off"'), 'tag' => $this->code . '-cc-cvv')));
     return $selection;
 }
Пример #18
0
 /**
  * Creates an array of fields that defines the required params
  * when using this module as a potential payment method.
  *
  * @return array
  */
 function selection()
 {
     global $order;
     // Setup the possibly expiry months
     for ($i = 1; $i < 13; $i++) {
         $expiryMonths[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     // Setup the possible expiry years
     $currentYear = date("Y");
     for ($i = $currentYear; $i < $currentYear + 10; $i++) {
         $expiryYears[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     // Build the selection array
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_EXALT_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('exalt_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_EXALT_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('exalt_cc_number')), array('title' => MODULE_PAYMENT_EXALT_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('exalt_cc_expires_month', $expiryMonths) . '&nbsp;' . tep_draw_pull_down_menu('exalt_cc_expires_year', $expiryYears)), array('title' => MODULE_PAYMENT_EXALT_TEXT_CREDIT_CARD_CVV, 'field' => tep_draw_input_field('exalt_cc_cvc', '', 'size="5" maxlength="4"'))));
     return $selection;
 }
function languageTextFields()
{
    $return = '
<table>';
    $languages = tep_get_languages();
    foreach ($languages as $amLanguage) {
        $return .= '
	<tr>
		<td align="right">' . tep_image(DIR_WS_CATALOG_LANGUAGES . $amLanguage['directory'] . '/images/' . $amLanguage['image'], $amLanguage['name']) . '</td>
		<td>' . tep_draw_input_field('text_field_' . $amLanguage['id'], '', 'id="' . $amLanguage['id'] . '"') . '</td>
	</tr>';
    }
    $return .= '
</table>';
    return $return;
}
function confirmation() {
      global $order;
      $confirmation = array('title' => $this->title,
                            'fields' => array(array('title' => 'Clique o botão "Pagar com Itau Shopline" ao lado e após ser exibido o boleto, confirme o Pedido clicando no botão abaixo.',
                                                    'field' => tep_draw_form('form', MODULE_PAYMENT_ITAU_SHOPLINE_URL, 'post', 'name="form" onsubmit=carregabrw() target="SHOPLINE"') .
                                                               tep_draw_hidden_field('valor', $order->info['total'], '') .
                                                               tep_draw_hidden_field('cliente', $order->customer['firstname'] . ' ' . $order->customer['lastname'], '') .
                                                               tep_draw_hidden_field('endereco', $order->customer['street_address'], '') .
                                                               tep_draw_hidden_field('bairro', $order->customer['suburb'], '') .
                                                               tep_draw_hidden_field('cidade', $order->customer['city'], '') .
                                                               tep_draw_hidden_field('estado', $order->customer['state'], '') .
                                                               tep_draw_hidden_field('cep', $order->customer['postcode'], '') .
                                                               tep_draw_input_field('Itau', 'Ita&uacute; Shopline', '', 'submit', true) .
                                                               '</form>')));
      return $confirmation;
    }
Пример #21
0
 function selection()
 {
     global $order;
     if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') {
         for ($i = 1; $i < 13; $i++) {
             $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
         }
         $today = getdate();
         for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
             $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
         }
         $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_OWNER, 'field' => $order->billing['firstname'] . ' ' . $order->billing['lastname']), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('psigate_cc_number')), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('psigate_cc_expires_month', $expires_month) . '&nbsp;' . tep_draw_pull_down_menu('psigate_cc_expires_year', $expires_year))));
     } else {
         $selection = array('id' => $this->code, 'module' => $this->title);
     }
     return $selection;
 }
Пример #22
0
 function get($fID)
 {
     $result = array('data' => $this->get_field_info($fID), 'options' => $this->get_options($fID));
     $options_array = $result['options'];
     foreach ($options_array as $option => $options_data) {
         $values_array = $this->get_values($option);
         $html_type = 0;
         if (isset($this->flat_array[$options_data['form_types_id']])) {
             $html_type = $this->flat_array[$options_data['form_types_id']];
         }
         $drop_down_array = array();
         foreach ($values_array as $key => $value) {
             switch ($html_type) {
                 case 'CHECK-BOX':
                     $result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => tep_draw_checkbox_field('checkbox[' . $value['form_values_id'] . ']', 'on') . '<sep>' . $value['form_values_name']);
                     break;
                 case 'DROP_DOWN':
                     $drop_down_array[] = array('id' => $value['form_values_id'], 'text' => $value['form_values_name']);
                     break;
                 case 'INPUT-LINE':
                     $result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => $value['form_values_name'] . '<sep>' . tep_draw_input_field('input[' . $value['form_values_id'] . ']'));
                     break;
                 case 'RADIO':
                     $selection = false;
                     if ($value['form_values_name'] == $value['form_values_default']) {
                         $selection = true;
                     }
                     $result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => tep_draw_radio_field('radio[' . $option['form_options_id'] . ']', $value['form_values_name'], $selection) . '<sep>' . $value['form_values_name']);
                     break;
                 case 'TEXT-AREA':
                     $result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => '');
                     break;
                 default:
                     if (empty($result['options'][$option]['values'][$key])) {
                         $result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => $value['form_values_name'] . '<sep>' . $value['form_values_default']);
                     }
                     break;
             }
         }
         if ($html_type == 'DROP_DOWN') {
             $result['options'][$option]['values'][$key] = array('name' => $option['form_options_name'], 'default' => '', 'html' => $option['form_options_name'] . '<sep>' . tep_draw_pull_down_menu('dropdown[' . $option['form_options_id'] . ']', $drop_down_array));
         }
     }
     return $result;
 }
    function getSetField()
    {
        $input = tep_draw_input_field('page_style', OSCOM_APP_PAYPAL_EC_PAGE_STYLE, 'id="inputEcPageStyle"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputEcPageStyle">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('pdt_identity_token', OSCOM_APP_PAYPAL_PS_PDT_IDENTITY_TOKEN, 'id="inputPsPdtIdentityToken"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputPsPdtIdentityToken">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('sort_order', OSCOM_APP_PAYPAL_DP_SORT_ORDER, 'id="inputDpSortOrder"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputDpSortOrder">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('ewp_openssl', OSCOM_APP_PAYPAL_PS_EWP_OPENSSL, 'id="inputPsEwpOpenSsl"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputPsEwpOpenSsl">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('ewp_private_key', OSCOM_APP_PAYPAL_PS_EWP_PRIVATE_KEY, 'id="inputPsEwpPrivateKey"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputPsEwpPrivateKey">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('sandbox_client_id', OSCOM_APP_PAYPAL_LOGIN_SANDBOX_CLIENT_ID, 'id="inputLogInSandboxClientId"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputLogInSandboxClientId">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('ewp_public_cert_id', OSCOM_APP_PAYPAL_PS_EWP_PUBLIC_CERT_ID, 'id="inputPsEwpPublicCertId"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputPsEwpPublicCertId">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }
    function getSetField()
    {
        $input = tep_draw_input_field('live_secret', OSCOM_APP_PAYPAL_LOGIN_LIVE_SECRET, 'id="inputLogInLiveSecret"');
        $result = <<<EOT
<div>
  <p>
    <label for="inputLogInLiveSecret">{$this->title}</label>

    {$this->description}
  </p>

  <div>
    {$input}
  </div>
</div>
EOT;
        return $result;
    }