Jump to content

vkd1980

Members
  • Content count

    61
  • Joined

  • Last visited

Posts posted by vkd1980


  1. Dear All,

     

    can anyone give me why this error happens on gv_send.php of Credit Class and Gift voucher

     

    My installation is

     

    OSC V 2.3.1

    Credit Class and Gift voucher

    Ulimate SEO URLS 5

     

    I think that tep_href_link function generates error

     

    Error!

     

    Unable to determine the page link!

     

    <td><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', $back_link) . '</a>'; ?></td>
    <td align="right"><span class="buttonAction"><?php echo tep_draw_hidden_field('action', 'send') . tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span></td>
    

     

    can anyone give me a solution


  2. Dear all,

     

    I have changed the Currency class for the achieving Above, works fine, But I would Like to get an opinion from Experienced professionals about the code Change, and will it affect any other classes/Functions

     

    Please post your suggestions

     

    <?php
    /*
     $Id$
     osCommerce, Open Source E-Commerce Solutions
     http://www.oscommerce.com
     Copyright (c) 2008 osCommerce
     Released under the GNU General Public License
    */
    ////
    // Class to handle currencies
    // TABLES: currencies
     class currencies {
       var $currencies;
    // class constructor
       function currencies() {
      $this->currencies = array();
      $currencies_query = tep_db_query("select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES);
      while($currencies = tep_db_fetch_array($currencies_query)){
        $this->currencies[$currencies['code']] = array('title' => $currencies['title'],
    												   'symbol_left' => $currencies['symbol_left'],
    												   'symbol_right' => $currencies['symbol_right'],
    												   'decimal_point' => $currencies['decimal_point'],
    												   'thousands_point' => $currencies['thousands_point'],
    												   'decimal_places' => $currencies['decimal_places'],
    												   'value' => $currencies['value']);
     }
       }
    // class methods
       function format($products_cur_id, $number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') {
      global $currency;
    
      $curr_query = tep_db_query("select * from ".TABLE_CURRENCIES." where currencies_id='".(int)$products_cur_id."'");
      $curr = tep_db_fetch_array($curr_query);
    
      if (empty($currency_type)) $currency_type = $currency;
      if ($calculate_currency_value == true) {
        $rate = (tep_not_null($currency_value)) ? $currency_value :$curr['value']; //$this->currencies[$currency_type]['value'];
        $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number * $rate, $curr['decimal_places']), $curr['decimal_places'], $curr['decimal_point'], $curr['thousands_point']) .$this->currencies[$currency_type]['symbol_right'];
      } else {
        $format_string = $curr['symbol_left'] . number_format(tep_round($number, $curr['decimal_places']), $curr['decimal_places'], $curr['decimal_point'], $curr['thousands_point']) . $this->currencies['symbol_right'];
      }
    // BOF: Store Mode
      if ((STORE_MODE == 'Maintenance') && (PRICES_OFF == 'true')) {
        $format_string = '';
      }
    // EOF: Store Mode
      return $format_string;
       }
       function calculate_price($products_price, $products_tax, $quantity = 1) {
      global $currency;
      return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
       }
       function is_set($code) {
      if (isset($this->currencies[$code]) && tep_not_null($this->currencies[$code])) {
        return true;
      } else {
        return false;
      }
       }
       function get_value($code) {
      return $this->currencies[$code]['value'];
       }
       function get_decimal_places($code) {
      return $this->currencies[$code]['decimal_places'];
       }
       function display_price($products_cur_id, $products_price, $products_tax, $quantity = 1) {
      return $this->format($products_cur_id, $this->calculate_price($products_price, $products_tax, $quantity));
       }
     }
    ?>
    


  3. Burt, Thank you for your reply,

     

    If we work on local currency manually while updating the Benefit of Exchange rate fluctuation will not get.

     

    In India there is a system for fixing the Exchange Rate of imported Books and periodicals. It done by goods office Committee and it will change only once in a month.

     

    but the store I am developing have more than 1000 Products of Imported Books. Its not an easy task to Update price of these products every month manually. that's why I looked the possibilities of Automating

    .

    I think that I need to Modify this "$currencies->display_price" function

    Please advice


  4. Dear All,

     

    I am developing an online book shop. In their book store, Books imported from Other Countries and priced in other currencies.At the time of selling they are calculating the Price in Local currency by prevailing Exchange Rate.

     

    How can I implement the same in OSC ? . I have successfully done it in Ms Access. But I didn't know how to do it in OSC

     

    Logic I intended to use is

     

    in Products Table I Inserted one field Currency ID.

     

    In OSC I need

     

    In Admin side

     

    Selection of currency while updating Products

     

    In Front End

     

    what ever the currency Updated in Products Table ,I need to Show the Price in Default Currency, by taking the exchange rate updated in currecny table of respective Currency.

     

    for Example

    1. If £10 is Currency updated in Products Table In front End it should show as Rs 850/-( 10*85(Current Exchange Rate)
    2. if Rs 10 is Currency updated in Products Table In front End it should show as Rs10/-( 10*1(No Exchange Rate as default currency)
    3. if $10 Currency updated in Products Table In front End it should show as Rs550/-( 10*55(Current Exchange Rate)

     

     

    Please help me


  5. Hi

     

    Me just installed the contribution, but generating following Errors while chekingout

     

    Warning: include(includes/languages/english/modules/giftwrap/MODULE_GIFTWRAP_INSTALLED) [function.include]: failed to open stream: No such file or directory in E:\Webserver\root\prabhus\includes\classes\gift.php on line 37

     

    Warning: include() [function.include]: Failed opening 'includes/languages/english/modules/giftwrap/MODULE_GIFTWRAP_INSTALLED' for inclusion (include_path='.;C:\php5\pear;includes/phpids/lib/') in E:\Webserver\root\prabhus\includes\classes\gift.php on line 37

     

    Warning: include(includes/modules/giftwrap/MODULE_GIFTWRAP_INSTALLED) [function.include]: failed to open stream: No such file or directory inE:\Webserver\root\prabhus\includes\classes\gift.php on line 38

     

    Warning: include() [function.include]: Failed opening 'includes/modules/giftwrap/MODULE_GIFTWRAP_INSTALLED' for inclusion (include_path='.;C:\php5\pear;includes/phpids/lib/') in E:\Webserver\root\prabhus\includes\classes\gift.php on line 38

     

    Fatal error: Class '' not found in E:\Webserver\root\prabhus\includes\classes\gift.php on line 40

     

     

    Thanks in Advance

    Vinod


  6. Dear All,

     

     

    I am developing Ms Access Admin interface for OSC V 2.3.1

     

     

    Proposed Features are

    1. This Application using ODBC over SSH to connect MySQL db hosted on web server,(Least of the hosting providers are allowing to connect MySQL remotely)
    2. Add, Edit,Delete Categories, Products Manufactures
    3. Changing Order Status, etc etc etc........... more are in mind

    Development is at beginning stage Suggestions and Opinions are welcome

     

     

    I Will upload the sample soon,

×