Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to change Orders ?


mondobongo3

Recommended Posts

in Admin, under Customers 'chapter' are Customers and Orders menus. Well, on Orders, on a client's order I can see Products, Model, Tax, Price(ex), Price(inc), Total(ex), Total(inc).

I would like to see also TopCategory for that product. Because I have similar products (similar only by name), in some different top-categories. And now, the client must specify in comments from what top-category has chosen the product. It's a little annoying and can lead to mistakes. If I would see this in Order, things would be smoother.

 

Thank you.

Link to comment
Share on other sites

I found something in admin/orders.php at line 234:

 

'            <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .

I think this lists the model for ordered product, but I don't know what to write instead, to list TopLevel category of that product.

 

Any suggestions?

Thanks.

Link to comment
Share on other sites

I found something in admin/orders.php at line 234:

 

'            <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .

I think this lists the model for ordered product, but I don't know what to write instead, to list TopLevel category of that product.

 

Any suggestions?

Thanks.

You can't. What it sounds like is that you are wanting to change the osC programming to accomodate poor business practices, but we certainly here cannot second guess your business.

 

A single item can be in multiple categories, therefore no single statement is going to give you the information you want. It can only list the multiple categories that it appears in. And, to do that it will have to save teh breadcrumb to the cart.

 

I certainly would not attempt to do what you are asking. What exactly are you attempting to do? Rather, why?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

You can't. What it sounds like is that you are wanting to change the osC programming to accomodate poor business practices, but we certainly here cannot second guess your business.

 

A single item can be in multiple categories, therefore no single statement is going to give you the information you want. It can only list the multiple categories that it appears in. And, to do that it will have to save teh breadcrumb to the cart.

 

I certainly would not attempt to do what you are asking. What exactly are you attempting to do? Rather, why?

To easily identify what the customer wants, directly from order. If I have product X in more categories, I must know from what category was ordered, because there are small differences.

Link to comment
Share on other sites

To easily identify what the customer wants, directly from order. If I have product X in more categories, I must know from what category was ordered, because there are small differences.

Personally, I think you should have unique model numbers for that purpose. What happens if some clerk puts something in the wrong category?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Personally, I think you should have unique model numbers for that purpose. What happens if some clerk puts something in the wrong category?

I need this to easily identify what the customer wants, directly from order. If I have product X in more categories, I must know from what category was ordered, because there are small differences. I'm not interested in Model, because the product doesn't really have this property. I could use Model, to write category name inside, but a typing error can lead to further mistakes, because there is no dropbox to select from available data, just an input box. The category is defined once, when it was created, and all products under that TopLevel category will share it, right?

It's just a personal customization, for each product listed, instead of Model, to see TopLevel category.

 

see image:

20100501023650.jpg

Link to comment
Share on other sites

As I see, it can't bee too hard, products[$i] is the iterated product from Products table, in db, then we must link it with category using products_to_categories table. I just don't know how to really do this, I don't know to write the code.

 

I know that is not what osCommerce is meant to do, but i need this.

 

Thank you.

Link to comment
Share on other sites

As I see, it can't bee too hard, products[$i] is the iterated product from Products table, in db, then we must link it with category using products_to_categories table. I just don't know how to really do this, I don't know to write the code.

 

I know that is not what osCommerce is meant to do, but i need this.

 

Thank you.

If you look at the products to categories table you will see that one product id can be in that table multiple times, linked to different categories. THAT is why a simple call to the product to categories table will not work, unless you have unique products (even though they are the same) for each unique category.

 

To do it the way you suggest would require the breadcrumb trail to be written to the basket when the product is added to the cart. The only other way (that I can see) is to have the unique products in unique categories. But you might just as well have unique model numbers and not be trying to re-write osC.

 

I hope I am wrong and someone will drop in and give you an easy solution that I just don't see.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

If you look at the products to categories table you will see that one product id can be in that table multiple times, linked to different categories. THAT is why a simple call to the product to categories table will not work, unless you have unique products (even though they are the same) for each unique category.

 

To do it the way you suggest would require the breadcrumb trail to be written to the basket when the product is added to the cart. The only other way (that I can see) is to have the unique products in unique categories. But you might just as well have unique model numbers and not be trying to re-write osC.

 

I hope I am wrong and someone will drop in and give you an easy solution that I just don't see.

I think you are right :( I didn't noticed that... indeed, the breadcrumb trail have to be taken from the time the product is added to the basket, then written in order when the order is placed. So, for now the only way is to use Model to represent TopCategory.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...