Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-24-2008 16:47:50

dskowron
Member
Registered: 11-26-2008
Posts: 138

A New Namespace Solved My Problem

I had posted a while back about something that would be very useful is if once an order is shipped and completed, it was archived in a different view so we don't have to search through what will eventually be thousands of orders to find the one we want to work on. What I did was pretty simple, and it solved my problem exactly how I wanted it to be solved. Let me refresh the scenario.

We have over a thousand orders in our cart. Some are pending payment (mail-in orders, etc.), some are in progress and some have been completed and shipped. As it ships, CCP only has two categories for orders. The one which contains all the in-progress and shipped orders is capable of getting very large. As I mentioned, we have over a thousand in there now. As you can imagine, wallowing through them all is pretty tough. See, we make our product to order for the most part, so when a customer orders something from us it takes a while to get it made and shipped. So, we have plenty of "in-progress" orders along with all the shipped orders in the table. I wanted the ones that are shipped to be separate from those which are either in-progress or pending payment. A new namespace was the answer. I went into the X-Core menu and then into the raw database admin where I opened the table for namespaces. I located the manageorder namespace and cloned it. I changed the name and the SQL statement associated with the namespace. I left everything else the same. Now, we a new item on our "Home > ClickCartPro > Commerce: Orders and Checkout" menu. It is "Manage Online Orders: Shipped". That contains all the orders which are completed. We still need to view them from time to time, but now they are all separated from the pending payment orders and the ones in progress. It works great and is just what we needed.

Granted, a mod like this isn't for the faint-of-heart (from a programming point of view), but being an old programmer from the days of teletype machines, I was more inclined to jump in and get it figured out.

It's all about the Namespaces. Look them over. They are little self-contained units sort of like classes in C++. They contain the methods and properties they need in order to perform their functions. In this case, the method is a SQL statement and their properties are the display parameters and so forth. You tell it where to display and with what group etc. Pretty cool, actually. No real coding was necessary to achieve this modification although at first glance it would seem totally prohibitive from a hand-coding perspective. I thought I was going to have to dissect the application code to find out how to insert this new custom menu item. Not so at all. It's all in the namespace paradigm. :-)

Offline

 

#2 12-26-2008 06:40:54

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

Design_Wholesale wrote:

It is so annoying the total disregard of CCP support for issues like yours - I often get the impression that they  their product to fail when they as good as tell people that something cannot be done, that CCP does not support whatever, etc.!

I'm sorry but there is anything BUT a "total disregard" for issues. What the poster did is more than a simple change and is one of those things that will likely get over written with an update. 

Design_Wholesale wrote:

My only question is how do I make orders actually appear under the newly created  namespace once I have marked them as ?

As he posted, he changed the SQL select statement associated with the namespace he copied so the select only looks for orders in a completed (which == shipped) status.

Offline

 

#3 12-26-2008 08:42:11

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

where status = C for completed orders.  There is no order status of shipped.  Completed implies shipped if an order is for products that are shipped.

Offline

 

#4 12-26-2008 10:04:11

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

Design_Wholesale wrote:

I was referring to other users, too. - There have been numerous posts where the CCP staff seem to have adopted a "maybe addressed in next release" stock response

Nobody ever gets a "stock response" John unless it's a question that's been asked multiple times and I have a stock answer that I know will resolve the problem.  If you haven't noticed yet, CCP focuses on a robust and secure set of core features.  Some of the things that are asked for may make sense for a majority of our customers but not all of them do.  Adding features for the sake of adding features that a very small percentage of people might use is not going to happen.

Design_Wholesale wrote:

and have then completely disregarded the issue even when the poster has struggled valiantly on and come up with something that almost works and which would work with a very small amount of input from someone like yourself.

I don't believe that's the case at all.  People don't/won't learn unless they try things and I always try to give appropriate hints to get them headed in the right direction.  There are times when I'll post a complete solution for a minor tweak but there are also times when a custom modification request is the more appropriate route.

Design_Wholesale wrote:

This bothers me allot and leaves me wondering whether development of CCP is really up to meeting user requirements

I'm sorry that it bothers you but, as I mentioned above, not every requirement or desire makes sense to add to the core.  One thing that tends to happen is "feature creep" where everything but the kitchen sink is available.  While some view this as a "good thing" it can, and does, make it harder for a person new to e-commerce to get started.  They simply get overwhelmed, frustrated and give up.

Anything that makes it into CCP is gone over with a fine toothed comb and we debate its merits and whether or not it will benefit a significant majority of our customers.  If it makes it through that process it gets added. There are a number of things that have, or will be, making their way into CCP based on user requests and suggestions.

Design_Wholesale wrote:

... that CCP obviously could not care less about and which they seemingly have no intention of even looking at, never mind implementing.

I have to take exception to that comment John.  There isn't a feature or suggestion that's been made here or privately that we haven't at least looked at.  As I detailed in the previous paragraph, there are some that won't be implemented in the core but anything that falls into that category is always possible as a custom modification.  One size does not fit all and all sizes don't fit everyone.  It's a balancing act.

Offline

 

#5 12-26-2008 10:46:00

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

As I said in post 5, you want status = 'C'.  You have not equal to C right now which is obviously not correct nor what you want.

Offline

 

#6 12-26-2008 12:38:16

dskowron
Member
Registered: 11-26-2008
Posts: 138

Re: A New Namespace Solved My Problem

For the namespace I was modifying, the sql statement is in the table itself. Some have their functions out in another file.

For us, "Completed" was ok, but we prefer the term "Shipped". So I just changed the labels. The db table still uses "C" to denote that class of orders. Bear in mind, I didn't start another table - just adde another view.

I don't know if this will get overwritten in an update or not, but if it does it will be very easy to add back in. I'm working on a method to conolidate all the admin functions into one screen when updating and manipulating orders. I'll make sure to keep track of what I do so if I do upgrade, I'll be able to maintain the modded code.

I think Dave does a great job of support. As a programmer from way back, I can appreciate what he goes through. Thanks Dave!

Offline

 

#7 12-26-2008 12:50:18

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

When version 7 is released the Advanced and Batch Order Management XMOD will be available which will give you a single page where you may modify EVERY bit of information about an order and, in batch, change the status and print invoices and/or packing slips all from a single screen.

Offline

 

#8 12-26-2008 18:30:16

dskowron
Member
Registered: 11-26-2008
Posts: 138

Re: A New Namespace Solved My Problem

Having all that data there on one page will be good if somebody needs that. What would be great would be to have that be configurable. For instance, all we are interested in updating is the order status and external comments and to have the ability to save the record and send the email from the same button click. Real simple. Real fast. A time stamp somewhere in the order to indicate it's last update would be great too. I think this is a mod I can write now, and I'll be looking at it in depth soon.

Offline

 

#9 12-26-2008 20:41:33

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: A New Namespace Solved My Problem

...so v7 won't have batch order management built in? we'll have to pay for v7 AND the AOM? I thought v7 was all about backend upgrades...and AOM is pretty much the main backend upgrade...can we just buy the AOM xmod or will the xmod conveniently require v7?

me is running out of money...smile

Offline

 

#10 12-26-2008 21:12:22

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

wyattea wrote:

...so v7 won't have batch order management built in?

No it will not.

wyattea wrote:

we'll have to pay for v7 AND the AOM?

If you want them both yes.

wyattea wrote:

I thought v7 was all about backend upgrades

There's quite a bit of change in the backend.

wyattea wrote:

and AOM is pretty much the main backend upgrade

Not the case at all.

wyattea wrote:

can we just buy the AOM xmod or will the xmod require v7?

ABOM will require version 7.

Offline

 

#11 12-26-2008 22:01:54

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: A New Namespace Solved My Problem

so... what backend stuff is there that makes it worth being considered a major upgrade (to v7) if ABOM isn't any part of it (since it's a separate xmod)? if ABOM isn't the main upgrade ("not the case at all") what other kind of things are in the backend? is it things we'll actually see in the backend or just rewritten code to allow for things like ABOM to be incorporated?

since v7 should be ready in the coming weeks (maybe longer if there are issues to resolve but just after the new year was previously suggested), it can't hurt to tell us what'll be in there...?

Offline

 

#12 12-27-2008 08:43:55

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

Design_Wholesale wrote:

Some of the modifications that look like being available in v7 are being attempted here and now by other members and it is all very well telling them that such and such will be covered by v7, but nobody is actually offering anything on what, precisely, will be available in the way of features and what we are going to have to buy as "addons",

When Nick has the details available I'm quite sure he will post them either here or on the web site.  I don't decide what does or does not become part of the core of CCP and what is made available as XMODs.  I can tell you that a couple of us have been arguing that things like AOM and BOM should be included in CCP but Nick has the final word.

Design_Wholesale wrote:

nor is information being made available on whether users could simply code their own versions of the "addons", to which I would say yes, most definitely they could because the "addons" are not going to require any major core code revisions because then you would be into new version territory and potentially creating all kinds of problems for future upgrades.

Since its inception CCP has always been able to be modified by anyone (a quick look at the things that have been done here in the forum is testament to that).  Coding something like AOM or BOM is a significant task and I know that first hand since I wrote both of them.  Right now the class for those is over 2400 lines of code and there is still some work to be done for BOM.  It's far far beyond a "simple" extension.

Design_Wholesale wrote:

So I would say to dskowron and wyattea yes, please  go ahead and create your own interfaces, AOM, ABOM, etc. - the core code is not going to need any major modifications and you would be saving us all a great deal of money!!

By all means, go for it.  But you won't be able to start until version 7 is released or you'll be doing it all over again.  I had AOM done and "in the can" a couple of months ago and I'm having to rework quite a bit of it because of the changes that are coming in version 7.

Offline

 

#13 12-27-2008 08:52:02

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: A New Namespace Solved My Problem

Dave wrote:

By all means, go for it.  But you won't be able to start until version 7 is released or you'll be doing it all over again.  I had AOM done and "in the can" a couple of months ago and I'm having to rework quite a bit of it because of the changes that are coming in version 7.

that's what confuses me...what sigificant changes could possibly warrant a whole version upgrade (to v7) if BOM and AOM aren't even part of it (but separate features that just rely on it).

Offline

 

#14 12-27-2008 09:01:24

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

More than I can detail in a post James.  Suffice to say that the core and CCP have had extensive surgery and virtually everything that has caused confusion for people since V6 was released has been addressed with V7 (and then some).

Offline

 

#15 12-27-2008 09:06:26

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: A New Namespace Solved My Problem

well, you wouldn't need to list all of the...how about 2 or 3 of the more noticeable changes, something to wet our appetites and not think that v7 is just an excuse to charge for a new version of ccp and new xmod's (bom/aom)?

Offline

 

#16 12-27-2008 12:10:30

dskowron
Member
Registered: 11-26-2008
Posts: 138

Re: A New Namespace Solved My Problem

So far, here's what I've done to my install to make it work better for our situation:

1). I disconnected the "Processing" orders from the "Completed" orders - they now have their own snapshot or "view" from the database that stores all the order records.

2). Gave my new snapshot view of shipped (completed) orders the same functionality as the other two views. i.e. the ability to view and modify (if necessary) the completed oders data just like you can with the "In Progress" orders.

3). I installed code written by Blitzen and modded by Dave which opens up the three funtions "Update Order Information", "Update Order Items (not particularly useful in my case)" and "Post Order Updates" in new windows so we don't lose our place when performing any of these tasks on a particular order.

Items 1 and 2 were accomplished in the KHXC application's "Database: Connections Backups and Raw Admin" section by cloning a namespace and adding a few new records to the dbguided table to give the required functionality to the new namespace.

Item 3 was accomplished by modding one file - ordersummary.php - as outlined in the post started by Blitzen which describes that mod. None of these mods were difficult, but figuring out how and where to do them was a bit tough. Thanks to Dave Martin for helping out there. You definitely need to think like a programmer if you are going to start looking at the core of the backend.

Next up is a single-page Order Management routine that will do what we want it to do for our particular situation. Once I get it figured out and done, I'll post it here if anyone is interested.

Dave Skowron
Red Bear Trading Company
wwwredbeartrading.com

Offline

 

#17 12-27-2008 12:14:39

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

dskowron wrote:

Next up is a single-page Order Management routine that will do what we want it to do for our particular situation. Once I get it figured out and done, I'll post it here if anyone is interested.

A very slight hint, you won't do it with what exists in the backend so think your own class and include.  Having been there and done that you've probably got a good solid 4-6 weeks of work.

Offline

 

#18 02-23-2010 19:38:42

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: A New Namespace Solved My Problem

This is a final version, of sorts, of what works with my webstore (thanks for posting this, , and for those who have helped answer those questions I needed answering in order to implement this in our webstore):



Clone  twice.


Change the  to  for one and  for the other.

Change the  values to correspond with the  values, only  the  prefix.

Change the  values to correspond with the  and  given to the namespace, so  for gbu0.manageordersc,  for gbu0.manageordersp, and  for gbu0.manageordersx.


Change the  values to correspond with the  and  given to the namespace, so

Code:

SELECT {COLS} FROM gbu0_orders WHERE status='C'

for  - gbu0.manageordersc,

Code:

SELECT {COLS} FROM gbu0_orders WHERE status='P'

for  - gbu0.manageordersp, and

Code:

SELECT {COLS} FROM gbu0_orders WHERE status='X'

for  - gbu0.manageordersx.

You should now have , , , and  under



Other fields, like , can be added too, should you require them.

Do  change ! - You should not need to modify the details for that namespace at all for the above changes. - Its  need to remain as:

Code:

SELECT {COLS} FROM gbu0_orders WHERE status<>'P' AND status<>'X'

...which simply tells the cart software to pull all oders from the namespace, but not where they are  (pending) or  (cancelled).


Lastly, those awful icons (especially the one with an exclaimation mark!) can be changed to something else! - .ico (icon) files (eg: favicon.ico) seem to work well as replacements.

Last edited by Design_Wholesale (08-14-2010 16:12:24)

Offline

 

#19 08-14-2010 16:19:28

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: A New Namespace Solved My Problem

I've hit a problem with this. - As far as I am aware I have done everything right, just as I detailed in my previous post in fact, and everything has been working fine ...but, in the backend the HREF for the cancelled namespace has become https://litez.co.uk/settings.php?app=gb … ageordersc for both completed orders (which is correct) and also for cancelled orders (which is not correct) and I absolutely can not fix it.

I have been over the database entries dozens of times (literally) and have even deleted the entries and recreated them from scratch...  No go, - the HREF stubbonly remains incorrect for the cancelled order namespace; although I can view the cancelled orders namespace no problem just by changing the HREF to https://litez.co.uk/settings.php?app=gb … geordersx, so it is not as though the namespace is broken ...and, yes, I have tried marking an order cancelled just to see what happened and no, it did not fix the problem whilst there was at least one cancelled order to view.

Can anyone please help me with this, because this is just crazy? - The details are all correct and there seems to be absolutely no reason for this to be happening.

Last edited by Design_Wholesale (08-14-2010 16:20:36)

Offline

 

#20 08-14-2010 17:45:23

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

Without access to your DB it's going to be really tough to try and figure out what might be going on John. As you know all of the links are built dynamically using information from the DB so it's quite likely there's a simple typo that's making things not work correctly.

Offline

 

#21 08-14-2010 18:00:44

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: A New Namespace Solved My Problem

Thanks for the help, Dave, I have now found it, though. - Right as I was creating a .csv file for display here - a corrupted entry had been duplicated and was taking precedence over the correct entry.

Last edited by Design_Wholesale (08-14-2010 18:09:22)

Offline

 

#22 08-14-2010 18:11:33

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

Design_Wholesale wrote:

Hmm, - you are right - what would be the best way to handle this? - I could easily enough post a .csv of the namespaces in question, if that would help.

You're welcome to send me a SQL dump of the khxc_namespaces table if you'd like. You're using the UK version of V6 correct?

Design_Wholesale wrote:

I think that this may be related to the other problem I have been having, too, where all the namespace and lists in the database are in DESC order and are refusing to conform to the correct menuorder, even when deliberately reversed as a test to see if things have been put in DESC order somewhere.

I didn't read back through this thread so I'm not sure what ordering wrt namespaces you may be referring to John.

Offline

 

#23 08-14-2010 19:07:55

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: A New Namespace Solved My Problem

We've crossed threads, I think (sorry, my fault for updating things).  The menu display order in the backend of our store is not behaving as it should (menudisplay values are being ignored - so setting something at 1 or 999 makes absolutely no difference - the item in question remains where it is in the menu and even setting the menu in question to display as ASC or DESC makes absolutely no difference, either).  Other than that, everything seems to be working OK, though, so it's more of an annoyance than anything else.  I have checked for more corrupted or duplicated entries, too, and have been unable to find any.

As for the software, - yes, I am using the UK version of CCP 6.0 and I appreciate being able to send you a SQL dump of the namespace - thankfully that should not be necessary, now, but if I could do that for future problems with database tables that, too, would be appreciated.

Thanks, too, for taking the time to help me with this.

Last edited by Design_Wholesale (08-14-2010 19:09:39)

Offline

 

#24 08-14-2010 20:50:43

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: A New Namespace Solved My Problem

What table do you see a menudisplay column in John? Ordering of things in the back end menus is alphabetical for the most part.

Offline

 

#25 08-15-2010 08:18:26

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: A New Namespace Solved My Problem

The problem was with  - now solved.

I decided to go with the  /  approach (always guaranteed to get results) and obliterated .

Several hours later and some interesting hacking of  I now have  ordered as it should ...and don't appear to have lost anything ... the webstore is still working ...so far.

Again, thanks for your help, Dave. - I realise that there is little advice anyone can offer where the database side of things is concerned (usually) without actually being able to see the database or tables in question and some things (like this namespaces problem) just don't seem to have a reason for displaying things incorrectly and just need to be reloaded (or nuked and reloaded in my case smile ).

Last edited by Design_Wholesale (08-15-2010 08:19:02)

Offline

 

Board footer