Jump to content

Link to order in customer Email not working


Guest PoolPartsOnline

Recommended Posts

Guest PoolPartsOnline

Hi

We have had a few customers mention that the link in their order tracking Email does not work.

I have tried with a customers order and the link takes you to the correct tracking page but there is no order number listed and when you copy and paste the order number into the correct field it just comes back to the tracking page with blank fields listed again.

I have just tried this with my own test account and the same happens until I log into my account, then it comes up with the order details. How will this work if the customer does not register to the site (i.e. ghost users)? I also just tried as a ghost user and I cannot track the order from the Email received at all.

Any one else had this problem?

Do I need to report it as a bug?

Look forward to hearing from anyone on this matter.

Pool Parts Online

Link to comment
Share on other sites

Would you please verify if any 'ghost' user does or does not actually appear in the CubeCart_customer database table? If not, I can see how tracking orders may be inhibited. If they are in the table, then the question becomes: What does the link in the email look like? Could anyone guess the link for any order? That is to say, does the link have the order number or an MD5 hash of the order number? Or does the link have a randomly generated code sequence difficult to guess?

If easy to guess, then the question is how private do you and/or your customers want to keep the order details?

Link to comment
Share on other sites

Guest PoolPartsOnline

Hi bsmither

No the customer does not appear in the customer list only against their order.

The Email link displays the web site address followed by the order number being accessed as below:

https://poolpartsonline.com.au/shop/index.php?_a=vieworder&cart_order_id=120115-164813-7960

This is one of the links I have been told about not working.

I have tested this myself as I said before and this is definitely the way it is happening.

Look forward to geeting an answer on this.

PoolPartsOnline

Link to comment
Share on other sites

  • 1 month later...

Any resolution to this issue? I'm having the same issue.

the link within the order email takes me to the vieworder page and asks me to put in my order number but that doesnt work either.

my guess is that the email link doesnt work because the actual order lookup doesnt work either.

appreciate any help.

Link to comment
Share on other sites

  • 5 months later...

I have previously reported a bug about Lookup Order not working until the customer is logged in - which totally rules out Ghost customers and makes no logical sense even for Registered Customers - since they could easily find their order in their account if they logged in. Haven't seen a resolution of it yet. I did add a note about your issue with ghost customers.

http://bugs.cubecart.com/view.php?id=299

Link to comment
Share on other sites

  • 1 year later...

I have previously reported a bug about Lookup Order not working until the customer is logged in - which totally rules out Ghost customers and makes no logical sense even for Registered Customers - since they could easily find their order in their account if they logged in. Haven't seen a resolution of it yet. I did add a note about your issue with ghost customers.

http://bugs.cubecart.com/view.php?id=299

This is still an issue I have also logged a cubecart support call.

Anyone know of a fix 

 

Also this link to the bugs, is dead as well 

Link to comment
Share on other sites

OK
The order lookup has 2 fields I never knew this as I only had one field labeled
Order Number and Email address are two fields they customer needs to fill out
For some reason my order lookup is NOT showing the label for email I have had the code checked and it is ok but will not show the email address
Is anyone else having this issue ?

 

Also it would be great if the customer could see their dispatch date and tracking number on this lookup.

 

5.2.8

 

Andy

Link to comment
Share on other sites

This is what the HTML sent to my browser looks like:

<fieldset>
  <div><label for="lookup_order_id">Order Number</label><span><input type="text" id="lookup_order_id" name="cart_order_id" value="" /></span></div>
  <div><label for="lookup_email"></label><span><input type="text" id="lookup_email" name="email" value="" /></span></div>
</fieldset>

Can you confirm that for your custom skin, the template content.orders.php has these statements near the end:

<fieldset>
  <div><label for="lookup_order_id">{$LANG.basket.order_number}</label><span><input type="text" id="lookup_order_id" name="cart_order_id" value="{$ORDER_NUMBER}" /></span></div>
  <div><label for="lookup_email">{$LANG.common.email}</label><span><input type="text" id="lookup_email" name="email" value="" /></span></div>
</fieldset>

It seems that this Smarty variable is not getting assigned: {$LANG.common.email}. Also, the variable {$ORDER_NUMBER} is not getting assigned. The Order Number field is supposed to be pre-loaded with the order being requested.

 

If the variable in your template is exactly {$LANG.common.email}, and {$ORDER_NUMBER}, then we need to ask, have you made a change, using CubeCart's Language Editor, to the language file you are using, in the Common group, for the email phrase?

 

(CubeCart assigns the entire language pack to Smarty's $LANG variable. There is only the one possible case where the variable in the template is missing or misspelled -- not where CubeCart erroneously does not populate this one array element. Changes made to a language using the admin Language Editor are saved in the database so that these changes will survive upgrades.)

Link to comment
Share on other sites

"Also it would be great if the customer could see their dispatch date and tracking number on this lookup."

 

It is important that when the admin is updating the order, the order's Delivery tab, something is entered in the Shipment Tracking Code field, even if the actual shipping method provides no way to track it.

 

But I think there is a bug with this.

 

For the specific order you have noticed this, what was the shipping module used? Then, look in the module's shipping.class.php file and determine if there is a function named 'tracking'.

 

 

 

I'll be back later with a suggested fix.

Link to comment
Share on other sites

Heh! Always something, isn't it!

 

Please make sure you haven't accidentally made an error, although disrupting the HTML should show some remnant of the submit button code. But there is nothing there. So, make sure all of that section of code looks like:

{else}
<div>
  <h2>{$LANG.account.lookup_order}</h2>
  <p></p>
  <form action="{$VAL_SELF}" method="post">
    <fieldset>
      <div><label for="lookup_order_id">{$LANG.basket.order_number}</label><span><input type="text" id="lookup_order_id" name="cart_order_id" value="{$ORDER_NUMBER}" /></span></div>
      <div><label for="lookup_email">{$LANG.common.email}</label><span><input type="text" id="lookup_email" name="email" value="" /></span></div>
    </fieldset>
    <div><input type="submit" value="{$LANG.common.search}" class="button_submit" /></div>
  </form>
</div>
{/if}
Link to comment
Share on other sites

The customer's email that details the products of the order should have the link. In CC525 (or maybe one version earlier) there was some incomplete code. But CC528 is supposed to have fixed that.

 

Assuming, of course, that the email template hasn't been corrupted such that the template variable for the link now does not work.

 

The template that has the link is the Cart: Order Confirmed.

 

I'm looking at my templates and seeing the WYSIWYG representation is all messed up. Ugh! I'll look at that later.

Link to comment
Share on other sites

To review: You are using "Courier Service" for shipping. There isn't a CubeCart folder named Courier_Service (in CC528), so I will assume this is a third-party module.

 

Assuming this, I will conclude that this module does not have a class method named tracking().

 

Here is a bug report:

 

 

In cubecart.class.php, line 2035 (CC528), a test is made for the presence of 'ship_method' and 'ship_tracking' values from the Order Summary.

If the admin has made entries for both those fields on the Delivery tab when editing an order, this test passes.

The next test is if the shipping module exists and if so, the next test is for the presence of the class.shipping.php having a tracking() method.

FedEx does not.

Therefore, the logic dead-ends at line 2052 and Smarty's DELIVERY is assigned with an unset $delivery -- in other words, nothing.

So, even if the admin entered good data, the customer will not see the FedEx shipping data on the skin's content.receipt.php output (customer's Your Order review screen).

 

 

Please find the shipping folder that you have named Courier Service, open the file shipping.class.php for editing, determine if it has the following code. If not, add it:

public function tracking($tracking_id = false) {
  return false;
}

Also note that the screenshot mentioned earlier indicates that the customer must be logged in. The CubeCart code implies that a "Ghost" customer will not see delivery data as that would be a risk. A logged in customer needs to have used a password where a Ghost customer need only an email and the order number to view order details.

 

I have yet to develop a fix to the code in cubecart.class.php.

 

Let us know if my assumptions were correct about your shipping module.
 

Link to comment
Share on other sites

This is my fix to show delivery info to a logged-in customer when the shipping module has failed to include a tracking() method in its code:

                    // Courier Tracking URLs
                    if (!empty($order['ship_method']) && !empty($order['ship_tracking'])) {

                        // Initial delivery data
                        $delivery = array(
                            'method'    => $order['ship_method'],
                            'tracking'    => $order['ship_tracking'],
                            'date'        => (!empty($order['ship_date'])) ? $order['ship_date'] : '',
                        );

                        // Load the module if it exists
                        $method    = str_replace(' ', '_', $order['ship_method']);
                        $ship_class    = CC_ROOT_DIR.CC_DS.'modules'.CC_DS.'shipping'.CC_DS.$method.CC_DS.'shipping.class.php';
                        if (file_exists($ship_class)) {
                            include $ship_class;
                            if (class_exists($method) && method_exists((string)$method, 'tracking')) {

                                // Better delivery data
                                $shipping = new $method(false);
                                $url = $shipping->tracking($order['ship_tracking']);
                                if ($url) {
                                    $delivery    = array(
                                        'method'    => $order['ship_method'],
                                        'url'        => $url,
                                        'date'        => (!empty($order['ship_date'])) ? $order['ship_date'] : '',
                                    );
                                }
                            }
                            unset($ship_class);
                        // } else {
                            //$delivery = array(
                            //    'method'    => $order['ship_method'],
                            //    'tracking'    => $order['ship_tracking'],
                            //    'date'        => (!empty($order['ship_date'])) ? $order['ship_date'] : '',
                            //);
                        }
                    } else {
                        $delivery = false;
                    }
                    $GLOBALS['smarty']->assign('DELIVERY', $delivery);
The code to replace starts near line 2045 for CC527 and line 2034 for CC528.
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...