Jump to content
ednique

[Contribution] Multi Pickup

Recommended Posts

solved ... I was wrong to make changes

 

How did you fix this problem as I am having the exact same issue?

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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 😉

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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);
    }

 

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×