Jump to content

Disabled initial shipping & tax estimates now A lot of Warnings in Log


Claudia M

Recommended Posts

Hi, I Disabled initial shipping & tax estimates in admin/store settings/features now I'm getting a lot of warnings in my error log.  Anything to be concerned with?  Thanks in advanced.

[18-Mar-2018 10:03:20 America/Louisville] PHP Warning:  Shipping not setup or allow no shipping not enabled in /home/claudias/public_html/classes/cubecart.class.php on line 1700
[18-Mar-2018 10:14:57 America/Louisville] PHP Warning:  Shipping not setup or allow no shipping not enabled in /home/claudias/public_html/classes/cubecart.class.php on line 1700
[18-Mar-2018 10:18:15 America/Louisville] PHP Warning:  Shipping not setup or allow no shipping not enabled in /home/claudias/public_html/classes/cubecart.class.php on line 1700


Also getting this error but I don't know if it's connected.

18-Mar-2018 05:18:07 UTC] PHP Warning:  array_merge() [<a href='http://docs.php.net/manual/en/function.array-merge.php'>function.array-merge.php</a>]: Argument #1 is not an array in /home/claudias/public_html/classes/seo.class.php on line 357
[18-Mar-2018 05:57:02 UTC] PHP Warning:  Invalid Security Token in /home/claudias/public_html/classes/sanitize.class.php on line 152

 

Link to comment
Share on other sites

Please remind us what version of CubeCart you are running. Line 1700 in the cubecart class is not where this error message is suppose to be coming from.

In the code, I see that "Disable shipping and tax estimates" and "Allow physical orders even if no shipping options are available" do not interact with each other. The error message implies "Allow if no shipping" is not enabled, and that no shipping modules are returning any rates.

This is line 357 (CC6114):

$_GET = (is_array($_GET)) ? array_merge($item_vars, $_GET) : $item_vars;

PHP is complaining $item_vars is not an array.

This suggests that the database table CubeCart_seo_urls has a 'type' that CubeCart is not coded to recognize, or a plugin/snippet that had implemented a custom type is no longer enabled.

 

Link to comment
Share on other sites

"In the code, I see that "Disable shipping and tax estimates" and "Allow physical orders even if no shipping options are available" do not interact with each other. The error message implies "Allow if no shipping" is not enabled, and that no shipping modules are returning any rates. "

So the error is not really a big deal? if you check Allow physical orders even if no shipping options are available then the customer has to click "update cart" to see shipping rates after using the estimator.

Link to comment
Share on other sites

In Foundation, when viewing the basket (strangely, not when at checkout) there is Shipping (Estimated) where clicking on Estimated will slide down a panel that has, at the bottom, a button to fetch good rates.

Clicking this button has no effect? Such that one still needs to click Update Basket?

Edited by bsmither
Link to comment
Share on other sites

I changed the code to radio buttons per a post in this forum.  Here is my code for skin/content/checkout-medium-up. And I changed the Estimate code too. Also disabled intial shipping in store admin.

For radio buttons:

 {if isset($SHIPPING)}
         <tr>
            <td colspan="4">
              <span class="txt pad-top">Select your shipping method  </span><br />
             <span class="txt-sm deep-red" style="font-weight:normal; padding-bottom:0.625rem!important;"> This may change if your delivery address changes during the checkout process</span>
                <ul class="no-bullet center" style="margin-top: 0rem!important;margin-bottom: 0rem!important;">
                  {foreach from=$SHIPPING key=group item=methods}
                  {foreach from=$methods item=method}
                  <li>
                    <input name="shipping" type="radio" value="{$method.value}" id="{$method.value}" {$method.selected|replace:'selected':'checked'}><label for="{$method.value}">{$method.display}</label>
                  </li>
                  {/foreach}
                  {/foreach}
                  </ul>
         </td>            <td class="bg-white">{$LANG.basket.shipping}<br />
              
            </td>
            <td class="text-right bg-white">{$SHIPPING_VALUE}</td>
         </tr>

Then for the Estimate:

<td class="bg-white txt pad-top bd-top"colspan="6">
               {if $ESTIMATE_SHIPPING}
               <a class="bg-white" href="#">Get a Shipping Estimate for your Delivery Address</a>
               <div>
                  <div class="txt-med norm">Specify your delivery address below. All information is required to get an accurate quote</div>
                 <div class="thinpad-top"><span class="txt-sm norm deep-red">For locations outside of the United States and its territories not available below please <a class="uline" href="/contact-us.html"target="_blank" title="Contact Us">contact us.</a>
               &nbsp;&nbsp;  Why we have this <a class="uline" href="/payments-/-shipping.html"target="_blank" title="International Shipping Policy">International Shipping Policy</a>
                 </span></div>
 <div class="pad-top"for="estimate_country">{$LANG.address.country}</div>
                  <select name="estimate[country]" id="estimate_country"  class="nosubmit country-list" rel="estimate_state">
                     {foreach from=$COUNTRIES item=country}<option value="{$country.numcode}" {$country.selected}>{$country.name}</option>{/foreach}
                  </select>
                  <div for="estimate_state">{$LANG.address.state}</div>
                  <input type="text" name="estimate[state]" id="estimate_state" value="{$ESTIMATES.state}" placeholder="{$LANG.address.state}">
                  <div for="estimate_postcode">{$LANG.address.postcode}</div>
                  <input type="text" value="{$ESTIMATES.postcode}" id="estimate_postcode" placeholder="{$LANG.address.postcode}" name="estimate[postcode]">
                  <input type="submit" name="get-estimate" class="button expand" value="{$LANG.basket.fetch_shipping_rates}">
                  <script type="text/javascript">
                  var county_list = {$STATE_JSON};
                  </script>
               </div>
               {/if}
            </td></tr>

Then in skin js/2.cubecart.js I changed line 82 too:

 $(".autosubmit select, .autosubmit input[type='radio']").not('.nosubmit').change(function() {
        $(this).parents(".autosubmit").submit();
    });

 

 

Link to comment
Share on other sites

No, if you click Fetch Shipping Rates it does update and shows shipping options with th default rate applied. If you select a different shipping rate other than the default it automatically applies that rate without having to update. The customer ony has to manually update the cart if I have "Allow physical orders even if no shipping options are available" enabled - which I don't.   Does my code look ok?  Can I ignnore that warning in my error log?

Link to comment
Share on other sites

That particular warning is "ignore-able", but please keep in mind it gets logged because CubeCart is not agreeing with something. Therefore, in this specific regard, CubeCart may not operate exactly as one may expect.

Still, /classes/cubecart.class.php, line 1700 is not where the error message is supposed to be coming from.

The code posted above looks fine. Your description of the customer experience seems to be according to plan.

Link to comment
Share on other sites

"That particular warning is "ignore-able", but please keep in mind it gets logged because CubeCart is not agreeing with something. Therefore, in this specific regard, CubeCart may not operate exactly as one may expect.

Still, /classes/cubecart.class.php, line 1700 is not where the error message is supposed to be coming from."

Well, that's going to bug me!  Anyway we can find out why this error is happening? Could it be in here?

Here is my code for skins/contents/checkout.small:

   <table class="expand">
            {if isset($SHIPPING)}
                            <tr>
   <td class="bdco-right"colspan="4">
              <span class="txt pad-top">Select your shipping method  </span><br />
             <span class="txt-med" style="font-weight:normal; padding-bottom:0.625rem!important;"> This may change if your delivery address changes during the checkout process</span>
                <ul class="no-bullet center" style="margin-top: 0rem!important;margin-bottom: 0rem!important;">
                  {foreach from=$SHIPPING key=group item=methods}
                  {foreach from=$methods item=method}
                  <li>
                    <input name="shipping" type="radio" value="{$method.value}" id="{$method.value}" {$method.selected|replace:'selected':'checked'}><label for="{$method.value}">{$method.display}</label>
                  </li>
                  {/foreach}
                  {/foreach}
                  </ul>
         </td>      
       
            </tr>


And further down:

 <tr>
          <td class="bg-white txt"colspan="6">
               {if $ESTIMATE_SHIPPING}
               <a class="txt-med bold bgw" href="#">Get a Shipping Estimate for your Delivery Address</a>
               <div>
                  <div class="txt norm">Specify your delivery address below. All information is required to get an accurate quote</div>
                 <div class="thinpad-top"><span class="txt-sm deep-red norm deep-red">For locations outside of the United States and its territories not available below please <a class="uline" href="/contact-us.html"target="_blank" title="Contact Us">contact us.</a>
               &nbsp;&nbsp;  Why we have this <a class="uline" href="/payments-/-shipping.html"target="_blank" title="International Shipping Policy">International Shipping Policy</a>
                 </span></div>
 <div class="pad-top"for="estimate_country">{$LANG.address.country}</div>
                  <select name="estimate[country]" id="estimate_country"  class="nosubmit country-list" rel="estimate_state">
                     {foreach from=$COUNTRIES item=country}<option value="{$country.numcode}" {$country.selected}>{$country.name}</option>{/foreach}
                  </select>
                 <div for="estimate_state">{$LANG.address.state}</div>
                  <input type="text" name="estimate[state]" id="estimate_state" value="{$ESTIMATES.state}" placeholder="{$LANG.address.state}">
                 <div for="estimate_postcode">{$LANG.address_en.zipcode}</div>
                  <input type="text" value="{$ESTIMATES.postcode}" id="estimate_postcode" placeholder="{$LANG.address_en.zipcode}" name="estimate[postcode]">
                  <input type="submit" name="get-estimate" class="button expand" value="{$LANG.basket.fetch_shipping_rates}">
                  <script type="text/javascript">
                  var county_list = {$STATE_JSON};
                  </script>
            </div>
              {/if}
          </td></tr>

 

Link to comment
Share on other sites

This error (the PHP Warning) is coming from /classes/cubecart.class.php, line 1700 (but a stock cubecart.class.php file has the statement that would produce this error close to line 1700 but not actually line 1700).

N.B.: A skin template would not even remotely be causing this kind of error to be logged.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...