Home Forums Theme Support Dokan Get Sellers country

This topic is: not resolved

This topic contains 10 replies, has 2 voices, and was last updated by  towhid 3 years, 7 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #70085

    Robert
    Member
    Post count: 58

    Hi,
    how can I get the sellers country?

    The following does not work, although “country” is the name of the field in the database:
    echo $store_info['country'];

    BTW: Other fields like the “store_name” I can get by this way.
    Thx, Robert

    #70320

    towhid
    Participant
    Post count: 4505

    Paste this line echo $store_info['address']['city']; instead of that line.

    Thanks

    #70329

    Robert
    Member
    Post count: 58

    Does not work either. Then I get this error:
    Warning: Illegal string offset ‘city'

    #70361

    towhid
    Participant
    Post count: 4505

    Please provide your login details(also FTP) by using this form: http://wedevs.com/provide-login-details/. I will have a look what is going wrong.

    Thank you ๐Ÿ™‚

    #70388

    Robert
    Member
    Post count: 58

    It's just available on my local test environment, I cannot provide you access to that.

    But please simply try this statement yourself and you will see, that it does not work.
    Above this, I do not want to get the city, I need to get the country of the seller store.
    Thx

    #70640

    towhid
    Participant
    Post count: 4505

    Hello Robert,

    Can you please use this code and let me know the result.

    <?php 
                            $store_info    = dokan_get_store_info( $store_user->ID );
                            echo $store_info['address']['country']; 
                        ?>

    Thanks

    #70722

    Robert
    Member
    Post count: 58

    Hi Tohid,

    this code works, but not with all store countries.
    I get the same error as before.
    But now I found out, that there seems to be a bug with saving these informations like country in the store settings.
    When you Click “Update Settings” there is no error but f.e. the country is not saved.
    Can you please test this?
    Thx, Robert

    #70805

    towhid
    Participant
    Post count: 4505

    Hello Robert,

    I did not understand your post clearly. Can you please attach a screenshot.

    Thanks

    #70831

    Robert
    Member
    Post count: 58

    Hi Towhid,

    you won't see anything in a screenshot.
    Please use your test environment with a seller account and go to Dashboard->Settings->Store.
    Try to change the country to “Burundi” foe example and then click “Update settings”.
    Then you will see, that there is no error message, but the changed country is not saved.

    Even if you fill out some other fields, which may be mandatory. However, there is no message or sign that they were mandatory :-(.
    So this has nothing to do with my initial question regarding “Get sellers country”. This now seems to be a bug, please let me know if I shall open a new thread for this.
    Thx, Robert

    #70844

    Robert
    Member
    Post count: 58

    Hi Towhid,

    this works now, I can update sellers country. I think there was a problem with the update to WordPress 4.3. After reorgization of the database this is ok now.

    Thx, Robert

    #70898

    towhid
    Participant
    Post count: 4505

    Please provide your login details by using this form: http://wedevs.com/provide-login-details/. I will have a look what is going wrong.

    Thank you ๐Ÿ™‚

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Get Sellers country’ is closed to new replies.