table of shipping and billing address in database

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #155575

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.1.5
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

where is store the shipping address and billing address in database??
please give me idea

Please Log in or Create an account to join the conversation.

  • Posts: 84147
  • Thank you received: 13651
  • MODERATOR
11 years 2 months ago #155581

Hi,

All the addresses are stored in the hikashop_address table including the shipping and billing addresses

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #155850

But when i'm delete all data of this table, the address display frontend site as well...why??

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #155858

I am triying to insert address as marked with shipping or billing. And create one data field in hikashop_address table to store them.
Now, How to display record of Address which address type is shipping or billing on frontend-site from database?
Please tell me.....
Thank u.........

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #155882

Hi,

But when i'm delete all data of this table, the address display frontend site as well...why??

That's maybe a cache issue, thanks to clear the Joomla cache, unpublish the cache plugin and clear your browser's cache and try it again ?

The addresses are by default both for billing and shipping, there is no difference. So you will have to create a new custom field in the table "address" to specify if it's a billing or a shipping one. Then a request will be required with a "WHERE" based on the value of the previously created custom field.

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #155984

I have already unpublish cache plugin....
Now i'm rename the table "hikashop_address" to "hikashop_address_X" The address will be display frontend-site...
What i do now ??

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #156012

Hi,

Renaming the hikashop tables is a hard change, and will require you to do a lot of modifications in the HikaShop core files, for all the requests, etc. It's a lot of work. And doing that will cause another problem, the problem of the updates, indeed you will no more be able to update your HikaShop version, because it will erase all your modifications at each update.

Using the custom fields was an easiest solution. It require some changes in the views, but thanks to our override system, you will not lose changes when updating.

When the custom field is created, in the view just hide the input field with some css properties, and add a value in depending on the part it is (shipping or billing), by this way when saving the information will be saved in the database, and when listing the addresses, you will be able to filter on that custom field value.

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #156157

Thanks Xavier,
But, I have problem, when i add new address the data is display front-site but not stored in database "hikashop_address" table... :(

Last edit: 11 years 2 months ago by Rohit.

Please Log in or Create an account to join the conversation.

  • Posts: 84147
  • Thank you received: 13651
  • MODERATOR
11 years 2 months ago #156174

All the addresses are stored in that table. It's not possible that you see an address on the frontend and don't have it stored in that table.

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #156311

How to put condition in administrator\components\com_hikashop\classes\address.php like
if(has_shipping){
$query = 'SELECT a.* FROM '.hikashop_table('address').' AS a WHERE a.address_user_id='.(int)$user_id.' and a.address_published=1 ORDER BY a.address_default DESC, a.address_id DESC';
}
Because i try to display different address in biiling-address (#hikashop_checkout_address_left_part) and shipping-address hikashop_checkout_address_right_part)

Last edit: 11 years 2 months ago by Rohit.

Please Log in or Create an account to join the conversation.

  • Posts: 84147
  • Thank you received: 13651
  • MODERATOR
11 years 2 months ago #156330

Go in your PHPMyAdmin and use the search tool of PHPMyAdmin on that table. You'll be able to sort the results of the search based on the column you want by clicking on the column title:
www.ipage.com/support/tutorials/view_tutorial.bml?kbid=5938

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #156471

How to change the select query of address for only
#hikashop_checkout_address_left_part in billing display??

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #156482

Hi,

If you are using the custom fields, you should better make a filter via php than on the request directly.
It will be easiest and in all cases the addresses are all loaded.

Else you will find the request in the address class:
"administrator/components/com_hikashop/classes/address.php"
But you should have to edit the view.html.php file in the ciew "checkout" in the frontend in order to change the call to the class to specify if you want billing or shipping address.

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #156686

I can't do this.
Please tell me how to specify Billing And Shipping address.
Thanks....

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #156692

Hi,

This is not possible by default in HikaShop. So as I said many times, it will require custom code.
Using the custom fields and do view overrides seems to be the best and easiest way of doing that.
It will require too some javascript to fill the hidden custom field with the value billing or shipping depending on the part where the address is..

Please Log in or Create an account to join the conversation.

Time to create page: 0.187 seconds
Powered by Kunena Forum