Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Baddesley

Pioneers
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Real Name
    Steve Dittrich

Baddesley's Achievements

  1. Hi, is anyone still monitoring this support thread? I tried to PM the originator, but it just bounced back. I installed this great contibution on my site a year or two ago and it worked a treat - but, I have just moved to a different hosting company and now it doesn't work at all. Everything else on my site and admin are working fine, just as they did before, but the Unique Attributes Manager fails to log in to my database and doesn't let me edit anything. What happens is that when I log into my admin, everything seems normal and everything works, until I go to *Attributes Manager and click to Edit something. At that point, I'm immediately logged off and have to log in again. When I log back in, I can go to the same page and click on Edit without getting logged off, but other than attempting (and failing) to access the database, nothing else happens. For some extremely weird reason, it's actually trying to log in with my ftp account details! How it even finds those, I haven't a clue, but I've had to remove this contribution for the moment to avoid this information showing up by accident in a google search (I've seen this on other people's sites!). Any ideas anyone?
  2. OK, finally sorted this one myself (typical, as soon as I post the problem!). The code error was occurring because although I'd set multiple zones in Admin, I'd not set values in the unwanted zones, so the array was empty - which it can't be and produces the 'string offset as an array' error. The code was fine. Once I'd sorted this, I just needed to play around with the other settings in Admin to get it all to work. Hope this helps someone else, as it's not all that intuitive!
  3. Hi, I hope someone can help me, as I'm pulling my hair out trying to fix this and getting nowhere. I installed a shipping add-on for UK Postal Rates (Royal Mail Complete Module, amongst many other add-ons which are all running fine) and copied/edited it for more shipping options and these work fine. I also modified one of the shipping file sets to make a shipping option for Europe. This set up fine in admin and looked OK, but when a customer from one of those countries (Italy in this case, which has been added to this option) recently tried to purchase something, as soon as they clicked on checkout, they got this error: Fatal error: Cannot use string offset as an array in /home/expanxen/public_html/includes/classes/shipping.php on line 99 I've since set up a dummy customer from Italy and tried it myself and get the same error every time, whereas UK customers have no problem at all. As far as I know, the code in this file has not been modified (I've copy/pasted this bit back in from a backed-up original file just in case, with no change) and I can't figure out what is causing the error, as I'm very new to php. I've searched the forums and although I have found similar problems, I have not found this exact one and can't figure out what is going on. The add-on was for a single zone, but I've changed it for multiple zones (this was a simple option already in the code), so maybe I haven't got my Admin setup quite right and it might not be the code at all, though I think I've tried everything I can! I'm using oscom 2.2rc2a on a Linux 2.6.31.6-grsec-VISION server with Apache, php5.2.6 (Zend: 2.2.0) and MySQL 5.0.91-community. Everything else seems to be running OK. The snippet of the code the error is referring to is below (line 99 is in blue): 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']); } } } } Any help would be much appreciated.
  4. Hi, I hope someone can help me with this, as I really need to get this to work. I have installed this add-on contribution (http://www.oscommerce.com/community/contributions,4451) and it works - as in it doesn't give any code errors and the discount is shown where it should do, but when using percentage discounts - which is what I need - the amount of discount is miles out. From my very little knowledge of PHP and a bit of deduction, it seems that the subtotal amount from which the percentage is being calculated is wrong; By removing the actual percentage calculation from the code, a real subtotal of £59.94 prints out a calculation sub-total of -£156. Trouble is, I can't see why this is wrong or even where it's getting this amount from - it's far too complicated for my limited knowledge. I've searched the forums and emailed both of the editors of this contribution, both with no success (no reply to either email), so I'm hoping someone else will be able to help. I couldn't find any follow-up forum for this add-on either. You can see my test site with this code at www.expanxe.net, my live site is www.expanxe.co.uk (currently without the discounts set). Hope that's not considered spamming - please remove if it is. Thanks in advance if anyone can help.
  5. Thanks, but I still can't get this to work, either it doesn't seem to handle sub-categories well, or I've still got it wrong. Let me explain better what I'm trying to do. I have a parent directory (one of many), this one with nine sub-directories. Two of these sub-directories have linked products in and I want to discount all items in both of them - but not anything in any other of the sub-categories or higher categories. How do I do that?
  6. Hi Scott, thanks for the contrib. I've installed this and it works fine with a single category included, though I had to reverse your logic to get it to work to this: function exclude_category($category) { switch($category) { case 22: return true; } return false; Using your logic (false, true) didn't work. However, when I try to change it to two sub-categories, i.e: function exclude_category($category) { switch($category) { case 24: case 137: return true; } return false; It gives very strange results, not discounting these categories, but discounting in a different sub-category under the same parent category. Any idea what is going on? Thanks, Steve.
  7. Hi, I'm new to OSC and don't know any php (just html) and I've just installed this, as I need it to show VAT exc. & inc. prices. I've already added Dynamenu and everything was working fine. I had no errors running the sql and have modified all of my own files, but now my home page shows: 'Fatal error: Call to a member function getProductsInCategory() on a non-object in /home/expacouk/public_html/includes/boxes/dm_categories.php on line 319' Any idea where I might have gone wrong? If anyone can help, I'd much appreciate it. Thanks.
×
×
  • Create New...