Jump to content

SlowButwilling

Members
  • Content count

    33
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Michael Walker
  • Location
    Cambridge UK
  • Website
  1. SlowButwilling

    Customer Groups and Newsletters/Emails

    Sorry - no I didn't. It can't be that hard for an experienced PHP coder, I wouldn't have thought, but perhaps none of them are reading this! :(
  2. Firstly, apologies if this has been asked before, I did search, but with no luck. I have Customer Groups installed, and have groups such as: 'Regulars', 'Members', 'Occasional Visitor' etc. I would like to be able to send Newsletters/emails to these groups as separate entities, that is, to be able to pick up 'Members' (say), or 'Regulars' from the drop-down box in the Newsletter Admin, so that ONLY members of that particular group received that email/Newsletter. Has anyone achieved this, or knows of a means to achieve it? Most grateful in advance.
  3. SlowButwilling

    fixes to PhpBB contribution

    Ah! Found it myself. For the benefit of anyone else, the code is in includes/header.php, the table block roundabout line 64.
  4. SlowButwilling

    fixes to PhpBB contribution

    Thanks. This is more or less the conclusion I've come to, but I would prefer it if only people who have logged onto OCS could access the 'forum' link - i.e that it was on a page that non-logged in visitors did not see. Do you have any notion how that might be achieved? TIA
  5. SlowButwilling

    fixes to PhpBB contribution

    I've tried really hard to install this contrib, but after several failures - and having read of so many other problems here - I'm coming to the conclusion that these two apps (phpBB and OCS) just aren't made for each other. However, I still need a forum. So, I have two questions: Can anyone recommend another bit of forum s/w which lives a little more happily with OCS? Alternatively, I thought of just installing a seperate phpBB - appropriately dressed up in site colours etc - which was only reachable by members already logged into OCS. I'd make all the phpBB facilities open to 'guests' (to stop folks having to log-in twice), which isn't perfect but at least I'd know that posters were only from my OCS member-base. So, question is: If you wanted to put a 'forum' link in a page ONLY visible to logged-in OCS members, which page would you use and what code would you employ? Many thanks in advance for any suggestions to either of the above.
  6. SlowButwilling

    [contribution] individual product shipping prices

    Hi. I am encountering the following error when attempting to Checkout with my goods: I know a problem like this has been mentioned way earlier in this thread, but I have tried to follow the advice/solutions given there without success. I imagine that I have declared 'indvship' twice at some point, but am not skilled enough to determine where - I guess in the classes/shipping.php file somewhere? I'm reproducing that file below in case it is of any use, and I would be most grateful for some help as the rest of the mod seems to be working fine. <?php /* $Id: shipping.php,v 1.23 2003/06/29 11:22:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class shipping { var $modules; // class constructor function shipping($module = '') { global $language, $PHP_SELF, $cart; // BOF: Individual Shipping Prices//phpmom.com $products = $cart->get_products(); $shiptotal = $this->get_shiptotal(); $indvcount = $this->get_indvcount(); // EOF: Individual Shipping Prices if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); $include_modules = array(); if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) { $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1))); } else { reset($this->modules); // BOF: Individual Shipping Prices//phpmom.com // Show either normal shipping modules or Individual shipping module when Individual Shipping Module is On // Show Individual Shipping Only if($indvcount==sizeof($products)){ //hadir if ((tep_get_configuration_key_value('MODULE_SHIPPING_INDVSHIP_STATUS')) && $shiptotal) { $include_modules[] = array('class'=> 'indvship', 'file' => 'indvship.php'); }} // BOF: WebMakers.com Added: Downloads Controller - Free Shipping and Payments // Show either normal shipping modules or free shipping module when Free Shipping Module is On // Free Shipping Only if ((tep_get_configuration_key_value('MODULE_SHIPPING_FREESHIPPER_STATUS')) && $cart->show_weight()==0 && ($shiptotal == '0' || !$shiptotal)) { $include_modules[] = array('class'=> 'freeshipper', 'file' => 'freeshipper.php'); } else { // All Other Shipping Modules if(sizeof($products)>$indvcount){ while (list(, $value) = each($this->modules)) { //try foreach is faster//hadir $class = substr($value, 0, strrpos($value, '.')); // Don't show Free Shipping Module if (($class !='freeshipper')/* && ($class != 'indvship')*/) { $include_modules[] = array('class' => $class, 'file' => $value); } } }} // EOF: Free Shipping and Payments// EOF: Individual Shipping Prices } for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) { include(DIR_WS_LANGUAGES . $language . '/modules/shipping/' . $include_modules[$i]['file']); include(DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file']); $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']; } } } function quote($method = '', $module = '') { global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes; $quotes_array = array(); if (is_array($this->modules)) { $shipping_quoted = ''; $shipping_num_boxes = 1; $shipping_weight = $total_weight; if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) { $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100); } if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT); $shipping_weight = $shipping_weight/$shipping_num_boxes; } $include_quotes = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if (tep_not_null($module)) { if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) { $include_quotes[] = $class; } } elseif ($GLOBALS[$class]->enabled) { $include_quotes[] = $class; } } $size = sizeof($include_quotes); for ($i=0; $i<$size; $i++) { $quotes = $GLOBALS[$include_quotes[$i]]->quote($method); if (is_array($quotes)) $quotes_array[] = $quotes; } } return $quotes_array; } //phpmom.com// find shiptotoal and indvcount(# of products with indv shipping// function get_shiptotal() { global $cart; $this->shiptotal = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // mod indvship//modified hadir // if ($products[$i]['products_ship_price']) { $products_ship_price = $products[$i]['products_ship_price'];//} $products_ship_price_two = $products[$i]['products_ship_price_two']; $products_ship_zip = $products[$i]['products_ship_zip']; $qty = $products[$i]['quantity']; if(($products_ship_price) ||($products_ship_price_two)){ $this->shiptotal += ($products_ship_price); if ($qty > 1) { if ($products_ship_price_two) { $this->shiptotal += ($products_ship_price_two * ($qty-1)); } else { $this->shiptotal += ($products_ship_price * ($qty-1)); } } } } // first mod ok $this->shiptotal += ($products_ship_price * $qty); // mod indvship//modified hadir // first mod ok $this->shiptotal += ($products_ship_price * $qty); // end indvship return $this->shiptotal; } function get_indvcount() { global $cart; $this->indvcount = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // mod indvship//modified hadir // if ($products[$i]['products_ship_price']) { $products_ship_price = $products[$i]['products_ship_price'];//} $products_ship_price_two = $products[$i]['products_ship_price_two']; if(is_numeric($products_ship_price)){ $this->indvcount += '1'; } } // first mod ok $this->shiptotal += ($products_ship_price * $qty); // mod indvship//modified hadir // first mod ok $this->shiptotal += ($products_ship_price * $qty); // end indvship return $this->indvcount; } //end phpmom.com function cheapest() { if (is_array($this->modules)) { $rates = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $quotes = $GLOBALS[$class]->quotes; for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) { if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) { $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']); } } } } $cheapest = false; for ($i=0, $n=sizeof($rates); $i<$n; $i++) { if (is_array($cheapest)) { if ($rates[$i]['cost'] < $cheapest['cost']) { $cheapest = $rates[$i]; } } else { $cheapest = $rates[$i]; } } return $cheapest; } } } ?> Any help hugely appreciated.
  7. SlowButwilling

    How can I get PayPal to work on my site?

    many thanks.
  8. SlowButwilling

    How can I get PayPal to work on my site?

    I hope readers will excuse the ignorance demonstrated by my question: A site I run is switching from straight forward old HTML/CGI scripting to OSC as a means of selling tickets to various events. We have an existing PayPal account and wish to continue to use it to handle these transactions. However, how do I 'tell' OSC about our account, so that when it contacts PayPal, PayPal 'knows' who we are and uses our existing account? At present, in dummy runs, PayPal just says that the 'seller' (us) doesn't have an account, but they'll send an email telling him/her how to open one so that the payment can be processed. Any help, or pointers to a source of information, kindly received.
  9. SlowButwilling

    Two prices

    There's a separate prices contrib, alink to which is here: http://forums.oscommerce.com/index.php?showtopic=53436 It might not be exactly what you want but could give you a good starting point.
  10. Hi. I just installed this contribution and all appeared to have gone well - no parsing errors etc when I fired up OSC with the new contrib installed. However, although it seems to be doing everything it should, my items are showing up with a price of '0'. When I check in the Admin area under 'Categories > Products' the prices etc are all still there as previously entered. I'm reasonably sure I followed the install instructions correctly....any suggestions as to where I might start looking would be gratefully received!
×