If this is your first visit, check our documentation. To post, register or login.

Looking For Help With a Plugin

Started by zippkits on 21 Nov 2016, 2:24 AM · Views: 345

Results 1 to 20 of 29
21 Nov 2016, 2:24 AM
#1
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Looking For Help With a Plugin

I am trying to use a plugin that does not work.
We are live, and really need this to work.

V1.5.5b

I contacted the author of the plugin, and he offered to fix it.
I paid him to do so (4 weeks ago) and he stopped answering my messages. Too busy I guess.

I am willing to pay someone to get this module TO WORK.

Please PM for info, as I really don't want this thread to go south...

Thanks!

21 Nov 2016, 8:32 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Zippkits:

I am trying to use a plugin that does not work.
We are live, and really need this to work.

It would really help a lot if you could let us know the name of the plugin.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

21 Nov 2016, 10:29 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Looking For Help With a Plugin

Or at least generally what it does/should do. Just in case don't want to point out the author. :P

Or could generally identify the/any error messages and maybe get guidance on how to fix the issue.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 Nov 2016, 9:41 PM
#4
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: Looking For Help With a Plugin

It is a shipping module, and no matter which of the 3 choices you select, it always goes to the first one on the checkout page.

My php is limited, and I thought maybe it was a simple duplicate ID or grammar error, but I can't find anything that works.

Again, I don't want to throw anyone under the bus, but we are in a bind with this, and I don't want to lose our international customers to a poor plugin.

22 Nov 2016, 2:18 AM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Zippkits:

It is a shipping module, and no matter which of the 3 choices you select, it always goes to the first one on the checkout page.

There's two parts to this, the shipping module/code and the checkout module/code.

With a default ZenCart install, and with most (all?) shipping modules the '1st one' is the cheapest one, and this is the one ZenCart will select. IOW, without more information, what you are seeing could we'll be normal behaviour with nothing to fix.

Zippkits:

My php is limited, and I thought maybe it was a simple duplicate ID or grammar error, but I can't find anything that works.

Seriously, in order to help, we need more info, because based on the severely limited information provided so far, I'm inclined to think that if there is a problem that needs fixing, it is probably something to do with your checkout code/module rather than the shipping module.

The main reason that makes me think this is because the shipping modules play a 'passive' role during during the checkout process. They don't get to 'select' which method or module is 'chosen' - This is all done by the 'active' checkout code.

Zippkits:

Again, I don't want to throw anyone under the bus, but we are in a bind with this

I also can't understand why you are being so 'secretive' here, or what you mean by 'throwing anyone under the bus'. Heck, for all I know, the shipping module in question could even by mine (ozpost), or perhaps the hacked version of my original, in which case I'd be less willing to offer help or advise, but at the end of the day, ZenCart, and all the modules in the add-ons are GPL and free to use/modify anyway so its no big deal, and hardly anything to keep 'secret'.

I suppose you could be referring to a commercial module that you've not paid for, which would explain your reluctance to give details, but then it comes back to where is the actual problem, the shipping module or the checkout module, and is there even a real problem that needs to be resolved?

Zippkits:

and I don't want to lose our international customers to a poor plugin.

Perhaps if we knew what plugin(s) you are using, we may even be able to offer a better solution/alternative.

I realise that you would like all of this in PM and that you are willing to pay, but the thing is, most of us that could possibly help probably won't even send a PM to get even these basic details because chances are, you are talking about a module that we know nothing about, so we/they would just be wasting our time. Most of us here aren't even interested in 'work for pay' - Which is why I/we tend to give public support, free of charge or obligation, If it comes down to the stage where 'paid support' is needed, THAT is when you'll get the PM's - IOW, give us a chance to help you out here 1st.

If the module in question is GPL and 'poor design', then I'm sure the designer would like to know what is 'poor' about it, and even be more than willing to fix (or provide other needed support)

Your instance on secrecy isn't helping you, or us.

Cheers
RodG

ps. Having said all that, if you want to PM me with more info, I'll be happy to follow through with further advice/suggestion, but I do not offer paid support.

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 3:26 AM
#6
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: Looking For Help With a Plugin

Wow. Okay...
Active ecommerce site that has been up for 10 years. Currently running 1.39h, but have been testing 1.5.5b and switching over tomorrow.

We started using DHL and found only ONE plugin for ZC.
zippkits.com

https://www.zen-cart.com/downloads.php?do=file&id=1910

It works fine until you get to the checkout page. No matter what option you select for DHL shipping, it goes to the first (and most expensive, by hundreds of dollars) option at the next page (checkout). You can go back and re-select anything you want (from the 3 DHL choices), but at the checkout page, guess what? Medical Express $$$ shipping.

To be clear:

I am not trying to "steal" anything from anybody.
I am not using "bootleg" software of any kind.
I paid the person that wrote this free plugin 4 weeks ago. Nothing.
I am just trying to keep his name out of this, as I know that sometimes life gets in the way.
I need this to work, nothing more.
I don't mind paying someone to actually get this working.

I appreciate everyone that has offered to help!

22 Nov 2016, 3:59 AM
#7
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Looking For Help With a Plugin

RodG:

Seriously, in order to help, we need more info, because based on the severely limited information provided so far, I'm inclined to think that if there is a problem that needs fixing, it is probably something to do with your checkout code/module rather than the shipping module.

The main reason that makes me think this is because the shipping modules play a 'passive' role during during the checkout process. They don't get to 'select' which method or module is 'chosen' - This is all done by the 'active' checkout code.

#1 - there is definitely a problem
#2 - i TOTALLY concur. i think the problem has NOTHING to do with the shipping module, but something in the checkout process is setting the $_SESSION['shipping'] to something other than the value contained in the $_POST['shipping']

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

22 Nov 2016, 4:41 AM
#8
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: Looking For Help With a Plugin

Thanks Rod and Carl.

Everything works fine for USPS. It's only when you try to select a shipping method returned by DHL that the problem occurs.

Joe

22 Nov 2016, 5:25 AM
#9
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: Looking For Help With a Plugin

If you select anything in the DHL box:
Attachment 16800

You always get this:
Attachment 16801

22 Nov 2016, 6:53 AM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Apologies in advance for all of the questions that follow. (I'm digging for clues).

Zippkits:

Active ecommerce site that has been up for 10 years. Currently running 1.39h, but have been testing 1.5.5b and switching over tomorrow.

Q1. Does this problem exist with both V1.39 and V1.5.5 (I'm assuming it does, but assumptions can lead us down the wrong path.

Q2. Is this the 1st time using this module, or have you been using it in the past without this problem?

Q3. Are you using the default ZenCart checkout, or are you using a module such as FEC or COWOA? (if so, does the problem go away if you disable the module and revert back to Zencart 'native'?

Zippkits:

https://www.zen-cart.com/downloads.php?do=file&id=1910
It works fine until you get to the checkout page.

I've just had a very quick glance at the code in this module, but nothing stands out as being a possible cause. :(

Zippkits:

No matter what option you select for DHL shipping, it goes to the first (and most expensive, by hundreds of dollars) option at the next page (checkout). You can go back and re-select anything you want (from the 3 DHL choices), but at the checkout page, guess what? Medical Express $$$ shipping.

As a test/experiment, I see from the screenshots you posted that posted that you have two shipping modules installed, and the 1st (USPS) apparently works fine, so what happens if you temporarily disable the USPS module, does the DHL module then function correctly?

If it does work OK with just the DHL module, try re-enabling the USPS module, but this time set the 'Sort Order' so that DHL is the 1st one shown. Does the problem then 'reverse' itself, with the DHL working correclty, and the USPS giving the odd behaviour?

I can appreciate that there may be a bit of urgency here, and that you'd rather pay someone to just 'fix it' rather than help us help you to debug the problem, in which case you may now have given us enough information that someone here is willing to take on the job, but meanwhile, if you are happy to work with us, I'm sure that it will only be a matter of time before someone figures out exactly what is going on, and if we can do this we will be helping others that may find themselves with an identical problem some where down the track.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 8:00 AM
#11
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Zippkits:

Thanks Rod and Carl.

Everything works fine for USPS. It's only when you try to select a shipping method returned by DHL that the problem occurs.

Joe

Try this:

Load the file
/includes/modules/shipping/dhlxmlservices.php into a text editor

Go to line#13, which should read

$methods=array();

Add the following line immediately after the one above.

$this->quotes = array('id' => $this->code, 'module' => $this->code ) ;  $quote = array() ; 

Save the file, and see if that fixes the problem.

If it does, feel free to pass on the solution back to the author and request a refund for whatever you paid him to not fix it. :)

Cheers
RodG

ps. There are probably other/better solutions, but this worked for me.

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 8:11 AM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Possibly a better solution

Same file as before:

Find this:
$this->title = MODULE_SHIPPING_DHL_TEXT_TITLE;

Change to
$this->title = "DHL";

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 8:37 AM
#13
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Looking deeper. If neither of those suggestions work,

Try (for further debugging)

Look for the line that reads:

  if ( (is_array($methods)) && (sizeof($methods) > 0) ) { 

Then immediately before it, add:

unset($methods) ; 
      $methods[] = array( 'id' => "a",  'title' =>  "dhla", 'cost' => 50 ) ;
      $methods[] = array( 'id' => "b",  'title' =>  "dhlb" , 'cost' => 20) ;
      $methods[] = array( 'id' => "c",  'title' =>  "dhlc" , 'cost' => 60) ;

This should give you 3 'methods' (dhla, b & c).

These should be selectable and work as expected.

If not, let me know.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 9:02 AM
#14
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

If my debugging code (post#13) additions prove successful, please remove them and replace with

 print_r($methods) ; die  ; 

The code should then read

  $bkgdetails = $dhlQuote->GetQuoteResponse->BkgDetails;
    
    $methods = array();
      $db_allowed_metods = explode(", ", MODULE_SHIPPING_DHL_TYPES);
      foreach($db_allowed_metods as $db_method){
          $allowed_methods[] = substr($db_method, 0,1);
      }
      foreach($bkgdetails->QtdShp as $detailed){
          if ((int)$detailed->ShippingCharge != 0){
              $title = ucwords(strtolower((string)$detailed->LocalProductName));
              $title = trim(str_replace('Nondoc', "", $title));
              $methods[] = array('id' => (string)$detailed->GlobalProductCode,
                           'title' => $title,
                           'cost' => ((string)$detailed->ShippingCharge) + (MODULE_SHIPPING_DHL_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_DHL_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_DHL_HANDLING) );
     
          }
      }
      
      print_r($methods) ; die ; 

    if ( (is_array($methods)) && (sizeof($methods) > 0) ) {
      switch (SHIPPING_BOX_WEIGHT_DISPLAY) {

Note: The code i've highlighted in red appears to be unused. I'm not seeing where the constant MODULE_SHIPPING_DHL_TYPES is being defined/set, which means you can't disable any of the methods that DHL provide (they are all enabled).
The line I've added (blue) will cause the module to 'die' but only after outputting the array data that is the source of the problem. Please copy and paste this data for us to see.

I'm about to call it quits for the day, but this info and your findings should probably help others to take it further (if not, I'll follow through tomorrow).

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 4:13 PM
#15
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: Looking For Help With a Plugin

Excellent suggestions Rod!
However, this bug is persistent. None of the edits worked.
When I added methods (from post 13), it acts the same way. No matter what you select, you get "a".

22 Nov 2016, 6:26 PM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Looking For Help With a Plugin

Zippkits:

Excellent suggestions Rod!
However, this bug is persistent. None of the edits worked.
When I added methods (from post 13), it acts the same way. No matter what you select, you get "a".

Please try the suggestion from posts#11 & #13 combined.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Nov 2016, 6:37 PM
#17
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Looking For Help With a Plugin

As a further note to this, the OP told me in PM that it never worked for them, on 1.3.9 or 1.5.5, so it doesn't appear to be a version difference. I don't have a DHL account so I can't test this completely on a test site. I did notice the original version has a debug setting that the new one doesn't include.

Are you able to select which service to include in the module's admin interface?


Zen Cart and it's community are the best!!

22 Nov 2016, 8:18 PM
#18
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: Looking For Help With a Plugin

Combined 11 & 13.
Still the same result. Still get "a".

22 Nov 2016, 8:50 PM
#19
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Looking For Help With a Plugin

Here's my evaluation...

The quote portion of the code is "working" in that at least a quote is provided for the various options that might be available. The problem is that after one is selected, when ZC goes back to pull the one quote out of the heap it returns an array of quotes (again) and as part of the "checkout_shipping" process, well, since an array is returned and it is true that the first array item is populated, then the first array item is what is provided. So basically after all/most of the data is grouped together (or while it is being put together) as part of the quoted response, then the array of methods needs to be reduced to just the $method that was provided. If that method does not exist then the "error" event needs to be a part of it.

Within the shipping module specifically the quote code, the $method variable needs to be used in order to pull/return the data associated with that $method.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 Nov 2016, 9:07 PM
#20
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Looking For Help With a Plugin

RodG:

If my debugging code (post#13) additions prove successful, please remove them and replace with

 print_r($methods) ; die  ; 

The code should then read

$bkgdetails = $dhlQuote->GetQuoteResponse->BkgDetails;

$methods = array();

$db_allowed_metods = explode(", ", MODULE_SHIPPING_DHL_TYPES);
foreach($db_allowed_metods as $db_method){
$allowed_methods[] = substr($db_method, 0,1);
}
foreach($bkgdetails->QtdShp as $detailed){
if ((int)$detailed->ShippingCharge != 0){
$title = ucwords(strtolower((string)$detailed->LocalProductName));
$title = trim(str_replace('Nondoc', "", $title));
$methods[] = array('id' => (string)$detailed->GlobalProductCode,
'title' => $title,
'cost' => ((string)$detailed->ShippingCharge) + (MODULE_SHIPPING_DHL_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_DHL_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_DHL_HANDLING) );

      }
  }
  
  print_r($methods) ; die ; 

if ( (is_array($methods)) && (sizeof($methods) > 0) ) {
  switch (SHIPPING_BOX_WEIGHT_DISPLAY) {
> 
> Note: The code i've highlighted in red appears to be unused.   I'm not seeing where the constant  MODULE_SHIPPING_DHL_TYPES is being defined/set, which means you can't disable any of the methods that DHL provide (they are all enabled).  
> The line I've added (blue) will cause the module to 'die' but only after outputting the array data that is the source of the problem.  Please copy and paste this data for us to see. 
> 
> I'm about to call it quits for the day, but this info and your findings should probably help others to take it further (if not, I'll follow through tomorrow). 
> 
> Cheers
> RodG

So using the above code pasted/modified by rod:

$bkgdetails = $dhlQuote->GetQuoteResponse->BkgDetails;

$methods = array();

$db_allowed_metods = explode(", ", MODULE_SHIPPING_DHL_TYPES);
foreach($db_allowed_metods as $db_method){
$allowed_methods[] = substr($db_method, 0,1);
}
foreach($bkgdetails->QtdShp as $detailed){
if ((int)$detailed->ShippingCharge != 0 && (!zen_not_null($method) || zen_not_null($method) && (string)$method == (string)$detailed->GlobalProductCode)){
$title = ucwords(strtolower((string)$detailed->LocalProductName));
$title = trim(str_replace('Nondoc', "", $title));
$methods[] = array('id' => (string)$detailed->GlobalProductCode,
'title' => $title,
'cost' => ((string)$detailed->ShippingCharge) + (MODULE_SHIPPING_DHL_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_DHL_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_DHL_HANDLING) );

      }
  }
  

if ( (is_array($methods)) && (sizeof($methods) > 0) ) {
  switch (SHIPPING_BOX_WEIGHT_DISPLAY) {

Sorry, I didn't remove all the extra text that Rod added, mostly because I can't tell on my screen exactly what is what, but all I added was code to the if statement inside of the foreach loop. 

Does this: if there is no method provided then, add whatever is returned, if there is a method provided to the quote then only add the data below that matches the method sought. Therefore if none are returned that match then no method added/matches.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...