Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2007
    Posts
    24
    Plugin Contributions
    0

    bug [Done v2.0.0] freeoptions shows up even when not applicable, if icon has been enabled

    Hi
    I set up the free shipping option (freeoptions) to offer free shipping on orders over 3 items and added an icon in the class constructor as follows
    $this->icon = (( defined('DIR_WS_ICONS') ? DIR_WS_ICONS : 'images/icons/' ) . 'shipping_ukrm.jpg');//~~Added icon

    Now the problem is when an order is placed which does not qualify for free shipping, on the checkout_shipping under the Shipping Methods shown, an empty fieldset is shown with only the icon in the legend .

    To correct this I had to modify the the freeoptins.php as follows in the
    function quote($method = '')
    at line 193 which is
    if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
    To the following
    if ($this->enabled) {
    if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
    }

    Now the reason I am asking if this is a bug is I have heavily modified the installation and this may be due to something else I have done however I don't think so but thought I would mention it here and let the experts determine if it is a bug or not

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Is this a Bug ???

    That solution should work fine.

    I'd be more inclined to move the closing } from the existing if($this->enabled) a from a few lines up such that it also includes the lines you mention and those above it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2007
    Posts
    24
    Plugin Contributions
    0

    Default Re: Is this a Bug ???

    Hi DrByte
    I had thought of that but wasn't sure if including the lines
    if ($this->tax_class > 0) {
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
    }
    would have any side effects.
    Many thanks for your reply
    Steven

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: freeoptions shows up even when not applicable, if icon has been enabled

    Indeed, having the quote['tax'] section (ie: setting the default tax class for the module to other than default) would cause the same problem, so it should all be wrapped in the same condition.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 3 Feb 2010, 09:51 PM
  2. Time-expiring Carts - has this been done?
    By avansant in forum General Questions
    Replies: 1
    Last Post: 24 Sep 2009, 07:49 PM
  3. product sorting with buttons - has it been done?
    By Mrchristoh in forum General Questions
    Replies: 0
    Last Post: 21 May 2009, 03:26 PM
  4. Free Shipping - shows up even when not supposed to
    By peeceelee in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Sep 2006, 09:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR