Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013
    Posts
    4
    Plugin Contributions
    0

    red flag Pre-select highest shipping cost instead of lowest

    Hi Everyone,

    Can anyone explain how I can change the pre-selected lowest shipping rate to be the highest please?
    I'm using different shipping modules in various combinations for different products:-

    Freeshipper
    Perweightunit
    Tables (Cloned)

    I'm not using the shipping modules for actual shipping purposes but for monthly fees and I want to encourage customers to choose the highest rate.

    Ive seen the thread to stop any shipping methods being pre-selected here http://www.zen-cart.com/showthread.p...hipping-method but thats not what I need.

    I hope someone can explain the maths needed for this to work.

    Thanks

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

    Default Re: Pre-select highest shipping cost instead of lowest

    I haven't tested it, but you could try the following...

    Edit /includes/classes/shipping.php
    Around line 176 you'll see the following. Try changing the < to > instead:
    Code:
              if ($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {
    .

    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
    Jan 2013
    Posts
    4
    Plugin Contributions
    0

    Default Re: Pre-select highest shipping cost instead of lowest

    Quote Originally Posted by DrByte View Post
    I haven't tested it, but you could try the following...

    Edit /includes/classes/shipping.php
    Around line 176 you'll see the following. Try changing the < to > instead:
    Code:
              if ($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {
    Thanks DrByte for this help and all the other posts you have made over some time.

    That did the trick

 

 

Similar Threads

  1. Pre-select a subcategory
    By atozstore in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 13 Apr 2011, 06:45 AM
  2. Specials showing lowest attribute - want to select which price shows
    By jill8026 in forum Setting Up Specials and SaleMaker
    Replies: 9
    Last Post: 23 Jun 2010, 02:50 AM
  3. Pre-select a shipping method?
    By Gem in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 3 Mar 2008, 06:35 PM
  4. List Products Lowest Price to Highest Price
    By fatalparadox in forum General Questions
    Replies: 1
    Last Post: 21 Aug 2007, 06:49 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