Author Topic: Update Shipping logic  (Read 2822 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Update Shipping logic
« on: November 11, 2023, 01:25:01 PM »
I have a extension 'default_flat_rate_shipping' turned on with price of $15  and now I have some products that requires individual shipping for $25.
The issue I am having is if a customer adds 1 product that has default flat shipping and 4 products of this individual shipping it charges $25*4 + $15  I want it to charge $24*1 + $15    How can I limit shipping for individual product to not multiply it by quantity?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Update Shipping logic
« Reply #1 on: November 13, 2023, 06:00:18 AM »
public_html/extensions/default_weight/storefront/model/extension/default_weight.php

line 87
see
Code: [Select]
if ($product['ship_individually']) {
    $cost += $fixed_cost * $product['quantity'];
}
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: Update Shipping logic
« Reply #2 on: November 13, 2023, 10:45:02 PM »
Thanks abolabo for your reply /default_flat_rate_shipping.php This is the file that needed to be updated.


Here is one more doubt regarding same issue. In my order I have 2 products one that has flat shipping rate of $25 and another one that has separate shipping for $15  I want shipping to be charged just $25 not $15 + $25= $40 (which ever is bigger). Where can I change that code??
« Last Edit: November 13, 2023, 11:10:11 PM by Sam_78 »

 

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.