Jump to content

Bryce F

Members
  • Content count

    48
  • Joined

  • Last visited

Posts posted by Bryce F


  1. I would go directly to catalog/checkout_shipping.php and do something with this line

      if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

     

    What if you change the cheapest to flat?

     

    Well, cheapest() seems to be returning an array, and I'm not sure exactly what I should replace it with in order to choose flat...


  2. Thanks for the link. I used it to make a slight modification to my own pickup module, and it worked fine. (Reinventing the wheel only took about 10 minutes anyhow...)

     

    Another question:

    Is there a clean way to have the default shipping method be flat rate (rather than cheapest)? I was considering modifying the includes/classes/shipping.php->cheapest() function to choose the correct method, but I figure there has to be a better way...

     

    Thanks!


  3. Hi there. I'm working on a website for a retail store. I currently have a flat-rate shipping cost enabled, which is fine. I'd also like to have an option where the customer can pick up the item directly from the store (and forgo the shipping charge).

     

    I figured I'd approach this by creating another shipping module that allowed me to set a pick-up price (0). I cloned the flat-rate module and changed the appropriate variable and function names both in the cloned main flat.php file (includes/modules/shipping/pickup.php) and the cloned language flat.php file (includes/languages/english/modules/shipping/pickup.php). Oddly, when I try to install/uninstall the module, or use the module when checking out my cart, I get the following errors:

    Warning: Cannot modify header information - headers already sent by (output started at /home/watermel/public_html/osc/includes/modules/shipping/pickup.php:55) in /home/watermel/public_html/osc/admin/includes/functions/general.php on line 22

    I also get the same error (minus the "admin/" part of the path) when I access this module from the cart checkout.

     

    If interested, here is my main pickup.php file, based on the flat.php:

    <?php
    
    class pickup {
       var $code, $title, $description, $icon, $enabled;
    
    // class constructor
       function pickup() {
         global $order;
         $this->code = 'pickup';
         $this->title = MODULE_SHIPPING_PICKUP_TEXT_TITLE;
         $this->description = MODULE_SHIPPING_PICKUP_TEXT_DESCRIPTION;
         $this->sort_order = MODULE_SHIPPING_PICKUP_SORT_ORDER;
         $this->icon = '';
         $this->enabled = ((MODULE_SHIPPING_PICKUP_STATUS == 'True') ? true : false);
       }
    
    
    // class methods
       function quote($method = '') {
         global $order;
         $this->quotes = array('id' => $this->code,
                               'module' => MODULE_SHIPPING_PICKUP_TEXT_TITLE,
                               'methods' => array(array('id' => $this->code,
                                                        'title' => MODULE_SHIPPING_PICKUP_TEXT_WAY,
                                                        'cost' => MODULE_SHIPPING_PICKUP_COST)));
         if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);
         return $this->quotes;
       }
    
       function check() {
         if (!isset($this->_check)) {
           $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 
    'MODULE_SHIPPING_PICKUP_STATUS'");
           $this->_check = tep_db_num_rows($check_query);
         }
         return $this->_check;
       }
    
       function install() {
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, 
    configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable In-store Pickups', 
    'MODULE_SHIPPING_PICKUP_STATUS', 'True', 'Do you want to offer in-store pickups?', '6', '0', 
    'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, 
    configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost',
    'MODULE_SHIPPING_PICKUP_COST', '0.00', 'The shipping cost for all orders using this shipping method.', '6', '0', now())");
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, 
    configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 
    'MODULE_SHIPPING_PICKUP_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0',
    'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, 
    configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order',
    'MODULE_SHIPPING_PICKUP_SORT_ORDER', '6', 'Sort order of display.', '6', '0', now())");
       }
    
       function remove() {
         tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
       }
    
       function keys() {
         return array('MODULE_SHIPPING_PICKUP_STATUS', 'MODULE_SHIPPING_PICKUP_COST', 'MODULE_SHIPPING_PICKUP_TAX_CLASS', 
    'MODULE_SHIPPING_PICKUP_SORT_ORDER');
       }
     }
    ?>
    

     

    Am I going about this the wrong way? Is there an easier way? Thank you for your time.


  4. Thank you for that link, it's most useful.

     

    Given that information above, do you know whether any of the payment modules that comply with US PCI DSS (Authorize.net, PayPal PayFlow Pro, LinkPoint, Trust Commerce) will achieve that sort of manual transactions to which I'd referred? Has anybody accomplished something similar to what I'm doing?


  5. Hello OSC gurus. I'm wondering about the implementation and ramifications of processing CC transactions manually.

     

    First, the "how":

    Is there a good module out there that will take CC info without actually processing it, so that I may process it myself manually? (Doing so is necessary for our business's POS system) And if there is, how does it store the info?

     

    Now the security issues:

    If I can accomplish this, what security issues should I be worried about. Should I encrypt; is there a good tool out there for doing this? Should I store CC info on my web server (even briefly) or should it go straight to my business computer?

     

    Has anybody out there done anything like this before? If there's no existing module out there for this, it's fine - I quite comfortable with PHP and would be ok coding it myself... just need to know the considerations.

     

    Thanks!

×