Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

FREE Addon: Order History Rate Topic   * * * * * 2 votes

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 04 September 2012 - 05:30 AM #61

Thanks, solesurvivor for creating this! This seems like a very useful add-on and I'll be installing it to my store. Thanks again!


Your welcome! Hope it works well for you.

 
  • Tim Hensel
  • Junior Member
  • Members
  • Join Date: 01-Mar 11
  • 237 posts

Posted 04 September 2012 - 01:22 PM #62

I have the notice warnings turned on in my PHP. This must be why trying to run this add-on I get the error:


Notice: Use of undefined constant _status_history_group - assumed '_status_history_group' in /home/xxxxxxxxxxx/public_html/store/addons/order_history/func.php on line 7

Notice: Use of undefined constant _status_history - assumed '_status_history' in /home/xxxxxxxxxxx/public_html/store/addons/order_history/func.php on line 7


Line 7 in func.php is:
$entries = db_get_array("SELECT os.*,d.description as group_description,e.description as status_description FROM ?:order_status_history as os LEFT JOIN ?:common_descriptions as d ON d.object_id = os.group_id and d.object_holder like ?l LEFT JOIN ?:common_descriptions as e ON e.object_id = os.status_id  and e.object_holder like ?l WHERE os.order_id = ?i", "%" . _status_history_group . "%","%" . _status_history . "%",$order_id);



Most online threads on this error say this Notice error is shown because of either a missing $ in a variable or missing quotes.
PHP is forgiving on this and will figure out what is meant, but it wastes extra processes.

Can anyone see what might be missing in the line above I'm getting this notice on?
I really like the mod and it is working, but it is just giving me the notice 'Use of undefined constant'.
- CS-Cart 2.2.5 Pro Store -

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 04 September 2012 - 02:10 PM #63

I have the notice warnings turned on in my PHP. This must be why trying to run this add-on I get the error:


Notice: Use of undefined constant _status_history_group - assumed '_status_history_group' in /home/xxxxxxxxxxx/public_html/store/addons/order_history/func.php on line 7

Notice: Use of undefined constant _status_history - assumed '_status_history' in /home/xxxxxxxxxxx/public_html/store/addons/order_history/func.php on line 7


Line 7 in func.php is:

$entries = db_get_array("SELECT os.*,d.description as group_description,e.description as status_description FROM ?:order_status_history as os LEFT JOIN ?:common_descriptions as d ON d.object_id = os.group_id and d.object_holder like ?l LEFT JOIN ?:common_descriptions as e ON e.object_id = os.status_id  and e.object_holder like ?l WHERE os.order_id = ?i", "%" . _status_history_group . "%","%" . _status_history . "%",$order_id);



Most online threads on this error say this Notice error is shown because of either a missing $ in a variable or missing quotes.
PHP is forgiving on this and will figure out what is meant, but it wastes extra processes.

Can anyone see what might be missing in the line above I'm getting this notice on?
I really like the mod and it is working, but it is just giving me the notice 'Use of undefined constant'.


I don't understand fully how Cs-Cart handles like conditions but maybe changing it to:

$entries = db_get_array("SELECT os.*,d.description as group_description,e.description as status_description FROM ?:order_status_history as os LEFT JOIN ?:common_descriptions as d ON d.object_id = os.group_id and d.object_holder like ?l LEFT JOIN ?:common_descriptions as e ON e.object_id = os.status_id  and e.object_holder like ?l WHERE os.order_id = ?i", "%_status_history_group%,"%_status_history%",$order_id);

Let me know if that fixes the problem.

 
  • Tim Hensel
  • Junior Member
  • Members
  • Join Date: 01-Mar 11
  • 237 posts

Posted 04 September 2012 - 02:33 PM #64

I don't understand fully how Cs-Cart handles like conditions but maybe changing it to:

$entries = db_get_array("SELECT os.*,d.description as group_description,e.description as status_description FROM ?:order_status_history as os LEFT JOIN ?:common_descriptions as d ON d.object_id = os.group_id and d.object_holder like ?l LEFT JOIN ?:common_descriptions as e ON e.object_id = os.status_id  and e.object_holder like ?l WHERE os.order_id = ?i", "%_status_history_group%,"%_status_history%",$order_id);

Let me know if that fixes the problem.


Hi! Thanks for the help ... Unfortunately now it cuases this error to appear when I tried to install: :(

Parse error: syntax error, unexpected T_STRING in /home/jammaboa/public_html/store/addons/order_history/func.php on line 22
- CS-Cart 2.2.5 Pro Store -

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 04 September 2012 - 02:45 PM #65

Well darn. Maybe some else can chime in on this one?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11499 posts

Posted 06 September 2012 - 06:22 AM #66

Syntactically,
"%_status_history_group%
should be
"%_status_history_group%"
Whether this will give you the proper results from the query, I have no idea. But know that 'LIKE' operators require a full table scan and that indexes can't be used. So you automatically inject a performance issue.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Tim Hensel
  • Junior Member
  • Members
  • Join Date: 01-Mar 11
  • 237 posts

Posted 06 September 2012 - 01:13 PM #67

Thank you tbirnseth!
That did fix the new error. It is now running okay, but there are now 4 more Notice: Use of undefined constant errors.

I tried then changing this code (where I was getting the 4 new errors) from:

if (is_numeric($entry[status_description]))
{
$status_description = $entry[status_description];
$status_substr = substr($status_description, -2);
$status_id = chr($status_substr);


$status_description = db_get_field("SELECT description FROM ?:status_descriptions WHERE type = ?s AND lang_code = ?s and status = ?s", 'O','EN', $status_id);
$entries[$counter][status_description] = $status_description;
}

$user_id = $entry[user_id];


To:

if (is_numeric($entry["status_description"]))
{
$status_description = $entry["status_description"];
$status_substr = substr($status_description, -2);
$status_id = chr($status_substr);


$status_description = db_get_field("SELECT description FROM ?:status_descriptions WHERE type = ?s AND lang_code = ?s and status = ?s", 'O','EN', $status_id);
$entries[$counter]["status_description"] = $status_description;
}

$user_id = $entry["user_id"];

You can see in the green color on status_description and user_id that I just added " " around them.

Now, this made the Notice: Use of undefined constant errors go away ... and it seems like it is working okay however I am not sure until I make an order change.

Making the change that I did, was this right?
I am just taking a guess at trying to fix it so I do not know if doing that was the right thing to do.


Also just to add my setup is (if this matters any):

Apache version 2.2.21
PHP version 5.2.17
MySQL version 5.1.63-cll


Thanks!
-T
- CS-Cart 2.2.5 Pro Store -

 
  • Tim Hensel
  • Junior Member
  • Members
  • Join Date: 01-Mar 11
  • 237 posts

Posted 06 September 2012 - 02:33 PM #68

Ugh .. nevermind. It seems like it is working okay but still getting lots of this: :(



Notice: Use of undefined constant user_id - assumed 'user_id' in /home/xxxxxxxx/public_html/store/addons/order_history/func.php on line 31

Notice: Use of undefined constant firstname - assumed 'firstname' in /home/xxxxxxxx/public_html/store/addons/order_history/func.php on line 31

Notice: Use of undefined constant lastname - assumed 'lastname' in /home/xxxxxxxx/public_html/store/addons/order_history/func.php on line 31

Notice: Use of undefined constant user_login - assumed 'user_login' in /home/xxxxxxxx/public_html/store/addons/order_history/func.php on line 31
- CS-Cart 2.2.5 Pro Store -

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11499 posts

Posted 06 September 2012 - 09:22 PM #69

The array indexes need quotes (because they are strings). Without it, they are seen as constants.
Apparently the original author does not turn on error reporting/display_errors during development to ensure the code is clean.

Alternatively you can add an
ini_set('display_errors', false);
to the top of the code and then the notices will not be seen. But for correctness, the root-cause problem should be fixed.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • curribhoys
  • Advanced Member
  • Members
  • Join Date: 29-Oct 12
  • 69 posts

Posted 29 October 2012 - 12:38 PM #70

good add on. Thanks
Thanks,
Anand

 
  • verveangel
  • Newbie
  • Members
  • Join Date: 24-Nov 12
  • 7 posts

Posted 27 November 2012 - 01:05 PM #71

Sorry I posted something in the wrong thread.

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 05 March 2013 - 10:07 AM #72

I've used this addon since V2.2.4 and have been using the V3 build, too.

On a 3.0.6, I have found an issue which is caused by this addon. CS-Cart Support diagnosed the issue and found when this addon is disabled, the issue does not exist.

The issue exists on the "orders.details" dispatch, specifically on the order page, eg:
yourstore.com/index.php?dispatch=orders.details&order_id=1
If this page is set up to use 3 columns (Grid 3, Grid 7, Grid 3), the third column is displayed below the first column. The effect is the space for where the third column should be is blank.

Looking at the source code, the order details page should generate like this:
<div class="container_16">
<div class="grid_3"></div>
<div class="grid_10"></div>
<div class="grid_3"></div>
</div>
However, it actually takes the third column and places it outwith the "container_16" class like so:
<div class="container_16">
<div class="grid_3"></div>
<div class="grid_10"></div>
</div>
<div class="grid_3"></div>
Has anyone else on V3 used this add-on and found this problem?
Hire StellarBytes for CS-Cart Design & Development Services

 
  • Dezigner
  • Member
  • Members
  • Join Date: 12-Oct 09
  • 136 posts

Posted 07 May 2013 - 12:30 PM #73

Hello,

I have installed this addon, and it is cool stuf, but I have found small problem here, I have created my own statuses, and after changing status to my own this addont instead of showing staus name shows me product description...

Anyone knows how to fix it?

 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1061 posts

Posted 15 August 2013 - 07:38 AM #74

Hello

This is addon for version 4.0.
We significantly simplified this addon but we hope that will be useful.

Best regards
Robert Diak

Attached Files


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 29 November 2013 - 11:24 AM #75

Hello

This is addon for version 4.0.
We significantly simplified this addon but we hope that will be useful.

Best regards
Robert Diak

I have used the "Order History" addon since v2 and have used it successfully between V2>V3 and now look to upgrade to V4. The database schema and values all look the same between my data in V2 and V3, yet on enabling your version of the addon, my Status History tab displays the dates correctly and the user who made the change but the status column is blank for every order.

I note the database schema is different in this V4 addon and is completely different to the original V2/V3 versions posted in this thread. The data is not updated to be compatible with this version of the addon so perhaps it would make sense to create a new thread for it.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • ben_erhan
  • Junior Member
  • Members
  • Join Date: 17-Aug 08
  • 16 posts

Posted 24 January 2014 - 11:54 PM #76

hello, thanks for this useful addon but I cant download the file.It makes error.I dont understand why.
Can you upload again?

 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 25 January 2014 - 12:05 AM #77

hello, thanks for this useful addon but I cant download the file.It makes error.I dont understand why. Can you upload again?

I just downloaded it and worked fine. You may need to try a different browser.
Regards,
Jim

 
  • ben_erhan
  • Junior Member
  • Members
  • Join Date: 17-Aug 08
  • 16 posts

Posted 25 January 2014 - 09:56 AM #78

I just downloaded it and worked fine. You may need to try a different browser.


I have tried with 3 browsers chrome-explorer-yandex, but I couldnt download this addon.I have downloaded lots of files in this site but this addon wasnt be downloaded.

If you send the file, I will be happy.

thank you

 
  • ben_erhan
  • Junior Member
  • Members
  • Join Date: 17-Aug 08
  • 16 posts

Posted 25 January 2014 - 09:59 AM #79

I could download the file. Thank you friend

 
  • mskitti
  • Member
  • Members
  • Join Date: 15-Feb 14
  • 47 posts

Posted 15 February 2014 - 07:58 PM #80

Using Firefox 26. Downloaded but cannot extract file. Get an error. I tried downloading 4 times the 1.1.2. I see the downloaded file only caontains a pdf page.

MsKitti