<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Change &amp;apos;Shipping&amp;apos; to &amp;apos;Delivery&amp;apos; in Simple Cart Order Summary </title>
        <link>https://interactivetools.com/forum/forum-posts.php?Change-Shipping-to-Delivery-in-Simple-Cart-Order-Summary-82840</link>
        <description></description>
        <pubDate>Sun, 19 Jul 2026 15:19:11 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Change-Shipping-to-Delivery-in-Simple-Cart-Order-Summary-82840" rel="self" type="application/rss+xml" />

                <item>
          <title>Change &apos;Shipping&apos; to &apos;Delivery&apos; in Simple Cart Order Summary </title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247498#post2247498</link>
          <description><![CDATA[<p>Thanks for your help Dave.</p>
<p>Thanks for pointing me in the right direction. I found a different solution. In customCart.php</p>
<pre class="language-markup"><code>function sc_addShipping($cartItems) {
	$shippingTotal = 0;
	foreach ($cartItems as $cartItem) {
		$shippingTotal += @$cartItem['shipping'] * @$cartItem['quantity'];
		foreach ($cartItem['OPTIONS'] as $option) {
			$shippingTotal += @$option['shipping'] * @$cartItem['quantity'];
		}
	}
	return array( 'name' =&gt; 'Shipping', 'TOTAL' =&gt; $shippingTotal );
}</code></pre>
<p>Changed:</p>
<p>return array( 'name' =&gt; 'Shipping', 'TOTAL' =&gt; $shippingTotal );</p>
<p>to</p>
<p>return array( 'name' =&gt; 'Delivery', 'TOTAL' =&gt; $shippingTotal );</p>
<p>Using the same method I changed TAX to VAT.</p>
<p>function sc_addTax($cartItems) {…</p>
<p>return array( 'name' =&gt; "VAT ($taxPercentage%)", 'TOTAL' =&gt; $taxTotal );</p>
<p>…}</p>]]></description>
          <pubDate>Sat, 07 Sep 2024 02:09:11 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247498#post2247498</guid>
        </item>
                <item>
          <title>Change &apos;Shipping&apos; to &apos;Delivery&apos; in Simple Cart Order Summary </title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247359#post2247359</link>
          <description><![CDATA[<p>Hi Jeff, </p>
<p>It looks like $extraLineItems is an array of fieldnames to arrays.  So name is defined in $extraLineItems.</p>
<p>I'm not familiar with that exact piece of code but if you want to override output for a single value you can do it like this</p>
<pre class="language-php"><code>&lt;p class="mb-0"&gt;
&lt;?php 
if ($extraLineItem['name'] === 'previous value') { 
  echo "new value"; 
}
else { 
 echo htmlencode($extraLineItem['name']);
}
?&gt;
&lt;/p&gt;</code></pre>
<p>Or you can use the new match expression in PHP 8.0+ which can be simpler than long if/if else/else statements:</p>
<pre class="language-php"><code>&lt;p class="mb-0"&gt;
&lt;?php
echo match ($extraLineItem['name']) {
    'old value 1'   =&gt; 'new value 1',
    'another value' =&gt; 'new value 2',
    default         =&gt; htmlencode($extraLineItem['name']),
};
?&gt;
&lt;/p&gt;</code></pre>
<p>Hope that helps!</p>]]></description>
          <pubDate>Tue, 16 Jul 2024 14:08:00 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247359#post2247359</guid>
        </item>
                <item>
          <title>Change &apos;Shipping&apos; to &apos;Delivery&apos; in Simple Cart Order Summary </title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2247358#post2247358</link>
          <description><![CDATA[<p>Where is 'name' set in the code below?</p>
<p>Can it be easily changed without screwing-up anything else? Thanks!</p>
<pre class="language-markup"><code>&lt;?php if ($extraLineItems): ?&gt;
&lt;?php foreach ($extraLineItems as $extraLineField =&gt; $extraLineItem): ?&gt;
&lt;div class="row"&gt;
&lt;div class="col-6"&gt;
&lt;p class="mb-0"&gt;&lt;?php echo htmlencode($extraLineItem['name']); ?&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="col-6"&gt;
&lt;p class="text-end mb-0"&gt;&lt;?php echo sc_moneyFormat($extraLineItem['TOTAL']); ?&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;?php endforeach; ?&gt;
&lt;?php endif; ?&gt;</code></pre>]]></description>
          <pubDate>Tue, 16 Jul 2024 04:03:40 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2247358#post2247358</guid>
        </item>
              </channel>
    </rss>
  