Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Multi Pickup


Guest

Recommended Posts

  • 2 years later...

I try to solve a problem on this module

 

Everything works great, but the problem is that when the order exceeds the limit of free shipping over amount (which we can set in the admin, ie, free shipping over x €) then are hidden other shipping methods.

 

So how could modify the code checkout_shipping.php to that do not disappear all shipping options even exceed the limit "from x € free"?

 

(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER <- this module)

 

Thanks.

 

(Sorry for my bad english)

Link to comment
Share on other sites

  • 7 years later...

I've just installed this on Phoenix and for the most part it works however if I have no Stores set to pick up from I get the below errors.

Quote

Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\catalog\includes\classes\shipping.php on line 95

Quote

Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\catalog\checkout_shipping.php on line 261

 

Link to comment
Share on other sites

1 hour ago, LeeFoster said:

I've just installed this on Phoenix and for the most part it works however if I have no Stores set to pick up from I get the below errors.

In includes/modules/shipping/multipickup.php, around line 61, find

      while ($store = tep_db_fetch_array($qstores)) {

and change to

      $this->quotes['methods'] = array();
      while ($store = tep_db_fetch_array($qstores)) {

One line added.  No existing lines changed. 

Always back up before making changes.

Link to comment
Share on other sites

3 hours ago, ecartz said:

In includes/modules/shipping/multipickup.php, around line 61, find


      while ($store = tep_db_fetch_array($qstores)) {

and change to


      $this->quotes['methods'] = array();
      while ($store = tep_db_fetch_array($qstores)) {

One line added.  No existing lines changed. 

Yep that did the trick. Thanks

Link to comment
Share on other sites

@LeeFoster, if you get this working consistently, it would be helpful if you could upload a new package with all the changes/instructions.  The hardest part about fixing this was finding a download that had the file!  The Apps area is not really designed to support incremental updates. 

It's also not clear to me what changes are necessary in general and what were specific to someone's store. 

Always back up before making changes.

Link to comment
Share on other sites

22 hours ago, ecartz said:

@LeeFoster, if you get this working consistently, it would be helpful if you could upload a new package with all the changes/instructions.  The hardest part about fixing this was finding a download that had the file!  The Apps area is not really designed to support incremental updates. 

It's also not clear to me what changes are necessary in general and what were specific to someone's store. 

It's since evolved in to an events system with a footer module for upcoming events, as well as event pickup.

Link to comment
Share on other sites

23 hours ago, ecartz said:

The hardest part about fixing this was finding a download that had the file!  The Apps area is not really designed to support incremental updates.

It's not the Apps Area, it's the uploaders 😉

Link to comment
Share on other sites

10 minutes ago, raiwa said:

It's not the Apps Area, it's the uploaders 😉

That's what I was saying.  The Apps area is not designed for the way that people have been uploading. 

There are changes that could be made to the apps area that would make it better, even *with* the way that people try to use it.  For example, a simple fix would be to allow people to mark uploads as incremental and offer a filter based on that.  Of course, then we'd need a fix for people who pick the wrong one.  E.g. voting on such tags. 

Always back up before making changes.

Link to comment
Share on other sites

  • 5 weeks later...

I'm now having a different issue with this. 

I have 3 shipping options set up - a standard shipping, this one and a single store pick up. 

All 3 appear as they should I can click standard shipping and single pick up without issue, however if I select the multi store pick up and then try to select one of the others 2 of the options vanish.

Website is here - https://www.lasercutarchitect.co.uk/

Link to comment
Share on other sites

  • 3 months later...

Just upgraded to Phoenix 1.0.5.2 and getting the following errors -

Notice: Undefined index: sID in C:\xampp\htdocs\360v3\admin\stores.php on line 339

Notice: Undefined variable: cInfo in C:\xampp\htdocs\360v3\admin\stores.php on line 339

Notice: Undefined index: sID in C:\xampp\htdocs\360v3\admin\stores.php on line 339

This is the line of code -

 $stores_query = tep_db_query($stores_query_raw);
    while ($stores = tep_db_fetch_array($stores_query)) {
      if (((!$_GET['sID']) || (@$_GET['sID'] == $stores['stores_id'])) && (!$cInfo)) {    <--- Line 339
        $cInfo = new objectInfo($stores);
      }

I am aware that these are only showing due to error reporting on Phoenix but I'd like to fix them if possible.

Link to comment
Share on other sites

14 minutes ago, LeeFoster said:

Just upgraded to Phoenix 1.0.5.2 and getting the following errors -

Notice: Undefined index: sID in C:\xampp\htdocs\360v3\admin\stores.php on line 339

Notice: Undefined variable: cInfo in C:\xampp\htdocs\360v3\admin\stores.php on line 339

Notice: Undefined index: sID in C:\xampp\htdocs\360v3\admin\stores.php on line 339

    $stores_query = tep_db_query($stores_query_raw);
    while ($stores = tep_db_fetch_array($stores_query)) {
      if (!isset($cInfo) && (!isset($_GET['sID']) || ($_GET['sID'] == $stores['stores_id']))) {
        $cInfo = new objectInfo($stores);
      }

 

Always back up before making changes.

Link to comment
Share on other sites

No getting 

Notice: Undefined variable: cInfo in C:\xampp\htdocs\360v3\admin\stores.php on line 21

Line 219 is 

<td class="main"><?php echo tep_draw_input_field('stores_title', $cInfo->stores_title, 'maxlength="255"', true); ?></td>

$cInfo this time is 

if (isset($_GET['action']) && $_GET['action'] == 'edit') {
    $store_query = tep_db_query("SELECT a.*, s.* FROM address_book a, stores s WHERE s.address_book_id = a.address_book_id and a.customers_id = 0 and s.stores_id =".$_GET['sID']);
    if(tep_db_num_rows($store_query)){
      $store = tep_db_fetch_array($store_query);
      $cInfo = new objectInfo($store);
    }

 

Link to comment
Share on other sites

Try

<td class="main"><?php echo tep_draw_input_field('stores_title', ($cInfo->stores_title ?? null), 'maxlength="255" required="required" aria-required="true"'); ?></td>

The default could also be an empty string or something else.  But I think that null works there and that pattern can be used to keep the current behavior and suppress the notice.  You're essentially saying, "Yes, I know it's sometimes not set.  But I don't care when that happens." 

The true is an argument that used to exist but has been removed from core, so delete it and add to the input parameters as shown.  In general, if your admin tep_draw_input_field call has more than three arguments, you should probably post it so it can be rewritten. 

Always back up before making changes.

Link to comment
Share on other sites

1 hour ago, ecartz said:

Try


<td class="main"><?php echo tep_draw_input_field('stores_title', ($cInfo->stores_title ?? null), 'maxlength="255" required="required" aria-required="true"'); ?></td>

The default could also be an empty string or something else.  But I think that null works there and that pattern can be used to keep the current behavior and suppress the notice.  You're essentially saying, "Yes, I know it's sometimes not set.  But I don't care when that happens." 

The true is an argument that used to exist but has been removed from core, so delete it and add to the input parameters as shown.  In general, if your admin tep_draw_input_field call has more than three arguments, you should probably post it so it can be rewritten. 

Thanks, got it sorted now.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...