oscommerce... Individual Product Shipping Prices

Discussion in 'PHP' started by naf, Sep 10, 2007.

  1. #1
    hi guys..

    i am fairly new to php,, i am trying to help a friend out and also trying to learn php at the same time.:D

    i am usng oscommerce ms2 with wamp on my local win machine,
    i installed this contribution http://www.oscommerce.com/community/contributions,1333/category,2/search,per+product.
    what it does is that it allows you to have multiple shipping options for your products.
    at the moment this what it does.

    product A shipping charge $6
    product b shipping charge $ 8

    final shipping : $14.

    I would like to change it so that instead of outputting the combined total .. it output the highest shipping charge.. like

    Product A shipping charge $6
    product B shipping charge $8

    final shipping charge : $8


    i been going through the code and i am very sure it is the addition this contrib makes to shipping.php in classes file , which handles the output of the shipping.

    i am copying the code below.. if any one can point me to the right direction i would appreciate it. i have asked this question in the contribution support section in oscommerce and have not recived any reply. there are quite a few ppl asking the same question but none of there question are neither answered.
    i would appreciate it.

     
    naf, Sep 10, 2007 IP
  2. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #2
    This section should be something like;

    if($products_ship_price>$products_ship_price_two){
        $this->shiptotal = $products_ship_price;
    }
    else
    {
        $this->shiptotal = $products_ship_price_two;
    }
    PHP:

    Hope that helps.
     
    Weirfire, Sep 14, 2007 IP