Page 1 of 1

Checkout_shipping page text change

Posted: Sat Jan 20, 2024 2:34 pm
by 14Steve14
Test store using 1.0.8.20 PHP8

I use raiwa's ship in cart addon but I don't think this affects it as the code seems to be in a core code module.

On the checkout shipping page the shipping methods show with a weight under the method which only shows as a figure and no weight type. (See left image below).

To remove that figure I have remove the following bit of code from the templates/default/includes/pages/checkout_shipping.php. The list now looks like the righthand image. I will copy this to the override folder when everything is working as I would like.

Code: Select all

          if (!Text::is_empty($method['title'])) {
            echo '<div class="form-text">' . $method['title'] . '</div>';
          }
Is that the correct way of removing that code as I cannot see a setting anywhere to not show shipping weight.

Also, should it show something after the weight figures like Kg or grammes or lbs or what ever weight the store owner uses.

Re: Checkout_shipping page text change

Posted: Sat Jan 20, 2024 2:42 pm
by burt
In the module file of each, something like;

Code: Select all

'title' => BLAH_BLAH_TEXT_WAY . ' ' . $shipping_weight,
to

Code: Select all

'title' => BLAH_BLAH_TEXT_WAY,

Re: Checkout_shipping page text change

Posted: Sat Jan 20, 2024 3:22 pm
by 14Steve14
Gary @burt Thanks for your help with this. I am getting there with the shipping modules you created.

The weight also shows in the sub totals on the page as well, so how to remove it from there.
checkout_shipping_2.png

Re: Checkout_shipping page text change

Posted: Sat Jan 20, 2024 4:08 pm
by burt
I'm not sure on that, is that an addon's output or is that core code output ?

I know I did something in order_total for 1.0.8.21, but that was a simple removal of a colon which wouldn't have anything to do with this, I think;
https://github.com/CE-PhoenixCart/Phoen ... 0357ebbed0