Jump to content
thirty bees forum
  • 0

State missing from customers/addresses list


vzex

Question

18 answers to this question

Recommended Posts

  • 0

I think that currently the only way this can be achieved is by making modifications (overrides) on the file that can be found in controllers/admin/AdminAddressesController.php

Aside of that I can't tell you specifically how to change that. I'm not that good and the furthest I went with my attempt to make this work ended up by implementing the column with the ID of the state. But I never found out how to put in the name of the states instead of the ID. (I made this on PS 1.6 not on the TB though)

 

Overall, this problem is linked to a bigger problem. Merchents do tend to modify these lists according to their needs as an exemple I also added the the "note" field in client, order and address controller. Because I need that field as a customer code is given for our ERP system and it's faster to use this to find a customer on the website.

I really don't know if this is possible, but maybe it would be interesting to look at a possibility for merchants to modify the list without touching the controllers or override them.

Link to comment
Share on other sites

  • 0
15 hours ago, AndyC said:

I would update first to the latest versions of panda 1.5.3 and TB 1.1.0

Hi Andy

Can you please confirm if the states are listed for the customers/addresses list in these updates?

I tried updating both when they first came out and it didn't go smoothly I had to roll back

Thanks!

3 hours ago, Gotabor said:

I think that currently the only way this can be achieved is by making modifications (overrides) on the file that can be found in controllers/admin/AdminAddressesController.php

Aside of that I can't tell you specifically how to change that. I'm not that good and the furthest I went with my attempt to make this work ended up by implementing the column with the ID of the state. But I never found out how to put in the name of the states instead of the ID. (I made this on PS 1.6 not on the TB though)

 

Overall, this problem is linked to a bigger problem. Merchents do tend to modify these lists according to their needs as an exemple I also added the the "note" field in client, order and address controller. Because I need that field as a customer code is given for our ERP system and it's faster to use this to find a customer on the website.

I really don't know if this is possible, but maybe it would be interesting to look at a possibility for merchants to modify the list without touching the controllers or override them.

Wow, having states listed for the customers/addresses list seems to be a given!

Why would this not be included?

Thought I just needed to change a quick setting I could not locate.

I can't believe something as significant as the state being missing when the town is included!

Just happened to notice this the other day when I wanted to sort customers by state for a specific tax to pay.

How is everyone else dealing with states not being included?

Thanks for your reply!

Link to comment
Share on other sites

  • 0

The address database table contain only the ID for the state, so there is a little something to create to get the ID and then get the state database table which is the only place where the state name is written in the database. And then replace the ID with the name.

So no, nothing really complicated when you know how to write it 😉

 

EDIT : as for not having state, in my case I had to create them since they didn't existed in Prestashop/TB. And I think that's parly why the code don't display the states to begin with, because not all states of every country is available

Edited by Gotabor
Link to comment
Share on other sites

  • 0
3 minutes ago, Gotabor said:

The address database table contain only the ID for the state, so there is a little something to create to get the ID and then get the state database table which is the only place where the state name is written in the database. And then replace the ID with the name.

So no, nothing really complicated when you know how to write it 😉

Hey hey :)

That's the part my skills are missing though the "know how to write it part" :)

Well write it correctly!

I "can" write it but will I break it is the part I fear! ;)

But I will try! On to PHPmyadmin...

Link to comment
Share on other sites

  • 0
6 minutes ago, wakabayashi said:

The cleanest way is to add such columns over a module and use the correct hooks. Overrides work of course too, but has some drawbacks when updating. 

This is quite a simple job. Basically you need to learn a bit of SQL... Btw: https://github.com/thirtybees/addressliststates

Just can't believe a module is needed to show a complete address

Included to be part of customers/addresses list out of the box is my thinking but I guess no one else has a problem with it missing

Link to comment
Share on other sites

  • 0
12 minutes ago, vzex said:

Just can't believe a module is needed to show a complete address

Included to be part of customers/addresses list out of the box is my thinking but I guess no one else has a problem with it missing

Tbh, I am really tired of such an attitude.

I could argue: why is there no company in the list? Another one needs address2... What's wrong with a well coded module? It's the cleanest solution for this problem.

Link to comment
Share on other sites

  • 0
Just now, wakabayashi said:

Tbh, I am really tired of such an attitude.

I could argue: why is there no company in the list? Another one needs address2... 

Really? So sorry to offend! For wanting a complete address?

Thanks for the github address just came back to thank you for the link attitude was not my intention at all!

And yes those other fields as well as an option if someone wanted them to be included.

Guess I'll move on but while searching for a fix and how to implement it there were the same questions being asked for prestashop.

Link to comment
Share on other sites

  • 0
1 hour ago, vzex said:

Wow, having states listed for the customers/addresses list seems to be a given!

Why would this not be included?

Every merchant has their own needs. Some of them sell worldwide and would like to see country/state. Others only sell locally. Some merchants absolutely have to see postcodes, others don't (yeah, there are countries with optional postcodes). Many EU merchants can't live without seeing VAT numbers, US merchants couldn't care less. What about business name? For b2b store it's also a huge requirement, for b2c not so much...

It's not possible to include all these information by default. The list would take too much space, and it would contain so much information that nobody could find anything, really. 

So, the decisions were made. The list contains those information that 80% of merchants needs the most. Of course, it sucks to be in the remaining 20%. But hey, customize it. That's why it's called open source.

   

 

  • Like 2
Link to comment
Share on other sites

  • 0

@vzex, your idea of a "complete address" is one of many. For some people and country they won't matter since they'll be selling mostly small products and send them through standard postal way.

But there are of course people selling in countrys with states having various tax rates, people selling heavy product and thus having more constraint. With heavy cargo, some carriers even have specific grids that are based on towns altitude, distance from storage center and don't take anything else into account.

Not to mention people selling all over the world...

 

And like @datakick wrote while I was answering you there are also things like VAT number which seems mandatory for some while other look at it and are thinking "not useful".

 

Also trust @wakabayashi about modules. They are the roadway for maintenance. When I took my job I was very green and did many unclean things including hardcoding some controllers (yeah I deserve to be slapped) and now, I'm like :
"
The website is fine it's getting more order every year, but how can I transition to TB, or any other ecommerce from where I am and not break the thing apart ? " The answer is I just can't, and I'll have to rebuild the changes I made over the year once we decide to change the CMS.

Edited by Gotabor
  • Like 2
Link to comment
Share on other sites

  • 0
15 minutes ago, Gotabor said:

@vzex, your idea of a "complete address" is one of many. For some people and country they won't matter since they'll be selling mostly small products and send them through standard postal way.

But there are of course people selling in countrys with states having various tax rates, people selling heavy product and thus having more constraint. With heavy cargo, some carriers even have specific grids that are based on towns altitude, distance from storage center and don't take anything else into account.

Not to mention people selling all over the world...

Yes I see that now

15 minutes ago, Gotabor said:

 

And like @datakick wrote while I was answering you there are also things like VAT number which seems mandatory for some while other look at it and are thinking "not useful".

 

Also trust @wakabayashi about modules. They are the roadway for maintenance. When I took my job I was very green and did many unclean things including hardcoding some controllers (yeah I deserve to be slapped) and now, I'm like :
"
The website is fine it's getting more order every year, but how can I transition to TB, or any other ecommerce from where I am and not break the thing apart ? " The answer is I just can't, and I'll have to either rebuild the changes I made over the year once we decide to change the CMS.

I'm trying to avoid modules since having bad experiences with them going back to prestashop.

Like no clean uninstall when deleted which is why I would prefer it be included.

I've downloaded @wakabayashi suggestion and will try to sort it myself unless there are other options I've not found yet.

https://github.com/thirtybees/addressliststates

Again sorry if I offended 🤗

 

41 minutes ago, datakick said:

Every merchant has their own needs. Some of them sell worldwide and would like to see country/state. Others only sell locally. Some merchants absolutely have to see postcodes, others don't (yeah, there are countries with optional postcodes). Many EU merchants can't live without seeing VAT numbers, US merchants couldn't care less. What about business name? For b2b store it's also a huge requirement, for b2c not so much...

It's not possible to include all these information by default. The list would take too much space, and it would contain so much information that nobody could find anything, really. 

So, the decisions were made. The list contains those information that 80% of merchants needs the most. Of course, it sucks to be in the remaining 20%. But hey, customize it. That's why it's called open source.

   

 

Been using thirtybees for several years only now did I want to sort by state and was surprised state was not listed but city was.

When something works you try not to mess with it! :)

State seems more important (to me) than city since it's easier to recognize.

I guess in the perfect coding world store having all those check boxes in the BO for those specific needs would be the ideal but since I don't code knowing the amount of work that it would entail voids my needs and the decision to not include states was the best choice for whatever reason.

Thanks so much for the perspective. I did it the old fashioned way and looked at every order to find the state for the time period I needed, bit tedious but job done.

 

If anyone else has dealt with adding states to customers/addresses list and found a solution please let me know!

In the old days @Nemo had a video ;)

If I figure something out I will post the solution

Thanks all for the input.

 

Link to comment
Share on other sites

  • 0
4 minutes ago, vzex said:

I'm trying to avoid modules since having bad experiences with them going back to prestashop.

It's true that some modules are very bad written. But you know, that this module is from tb itself, right?

I can just explain my point: There are issues, where we don't find an easy solution. But there are issues, which can be solved easily or are already solved. I spend my free time here, to help people. Every second time I "deliver" a solution, it is refused. People without any coding language seem to know better, how to solve problems theoretically, but practically they fail at the simplest tasks. In my own store I have to find solutions for problems like "using a handscanner in tb asm". Which is really complex and no easy solutions are available. It just hurts me, to see, how you waste your time instead of moving your store foward. And in fact I waste my time myself in such cases. 

Same is true for people, who send me pn and hope for free support, but are not even willing to share their ftp access... Such expierence just lead to my absent here (I already did the last month).

Or does anyone has a reason, why I should stay/help here instead of solving just my own coding problems?

Link to comment
Share on other sites

  • 0
6 minutes ago, wakabayashi said:

It's true that some modules are very bad written. But you know, that this module is from tb itself, right?

Yes I thought it was and already downloaded, just need to figure out what to do with it now.

6 minutes ago, wakabayashi said:

I can just explain my point: There are issues, where we don't find an easy solution. But there are issues, which can be solved easily or are already solved. I spend my free time here, to help people. Every second time I "deliver" a solution, it is refused. People without any coding language seem to know better, how to solve problems theoretically, but practically they fail at the simplest tasks. In my own store I have to find solutions for problems like "using a handscanner in tb asm". Which is really complex and no easy solutions are available. It just hurts me, to see, how you waste your time instead of moving your store foward. And in fact I waste my time myself in such cases. 

Same is true for people, who send me pn and hope for free support, but are not even willing to share their ftp access... Such expierence just lead to my absent here (I already did the last month).

Or does anyone has a reason, why I should stay/help here instead of solving just my own coding problems?

I'm sorry if you feel people aren't treating you with appreciation.

I'm sure you have helped me somewhere in the past as well.

My best advice is do what you feel comfortable doing, be like a duck and treat the negative like water, let it roll off.

Have a good rest of your day!

 

PS (post script not prestashop) 😉

Scanner? Ooo that sounds interesting, like scan product bar codes to enter into TB?

On a product quantity side note I've noticed my product quantities don't always jive especially if I manually change them.

The quantity number will not save unless I change it three or more times, then it finally sticks.

Figured it was a caching internet issue so never posted about it.

Link to comment
Share on other sites

  • 0
2 minutes ago, vzex said:

Scanner? Ooo that sounds interesting, like scan product bar codes to enter into TB?

Yeah exactly... When we get orders from supplier, we want to scan them and update everything automatically. We want to use chaotic storage as well... But ok this is not part of this topic.

Well you can just download this: https://github.com/thirtybees/addressliststates/releases/download/1.0.0/addressliststates-v1.0.0.zip and install it.

Link to comment
Share on other sites

  • 0
14 minutes ago, wakabayashi said:

Yeah exactly... When we get orders from supplier, we want to scan them and update everything automatically. We want to use chaotic storage as well... But ok this is not part of this topic.

Well you can just download this: https://github.com/thirtybees/addressliststates/releases/download/1.0.0/addressliststates-v1.0.0.zip and install it.

Well don't I feel stupid!

That took a whole 30 seconds to install to solve my problem!

THANK YOU SO MUCH FOR CLARIFYING!

Must need more coffee because I was lost after downloading not realizing it's a simple module install!

See this is the problem, thirtybees just works for me been a long while since I had to mess with anything and it was as simple as that.

You are much appreciated @wakabayashi

1669314634_ScreenShot2020-01-21at11_59_36AM.png.02b5ed73ae68d08bcac8fe539323d51a.png

 Like magic, there is the state!

570535351_ScreenShot2020-01-21at12_01_17PM.thumb.png.8b63b0e11aee6f2c5643bbab3768785c.png

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...