Monday, August 22, 2005

Debug Variables in PHP

by damonp on August 22, 2005

in PHP,Snippets

Drop this function into a PHP include and use it to print out variable debugging info during runtime.
[click to continue…]

Popularity: 3%

{ 1 comment }

A quick and dirty hack of the ZenCart UPS shipping module that adds a separate modifier value for ground and air shipping methods. This will allow a store to play with reduced shipping costs to see if high shipping costs are preventing some sales.

Installation

  1. Back up current UPS shipping module at includes/modules/shipping/ups.php
  2. From the ZenCart shipping modules admin menu, uninstall the current UPS shipping module. Make a note of the options you have selected for the module.
  3. Save zen_ups_mod_w_modifier.php as includes/modules/shipping/ups.php in your ZenCart distribution. (view source)
  4. Install and activate the updated module with your options
  5. The final option at the bottom of the page is new, Shipping Modifier

    Percentage modifier for this shipping method. ([0.50, 0.25] for half off Ground 25% off Air)

  6. To adjust what is considered Air adjust the following array in the new module file:
    <?php
    $air_methods = array('1DA', '2DA');
    ?>

    Just add the 3-digit shipping type code to the $air_methods array (see $this->types for a full list).

Popularity: 3%

{ 1 comment }

Eject Stuck PowerBook CD/DVD

22 August 2005

From a terminal window: drutil tray eject If that fails try, the command drutil list in a terminal. This will provide a list of all currently connected removable devices. Then use the command: drutil tray eject 1 Where 1 is the number of the CD/DVD drive in the list If both of those fail try [...]

Read the full article →