- Posts: 11
- Thank you received: 0
table of shipping and billing address in database
-- 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.
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.
Please Log in or Create an account to join the conversation.
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.
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 ?But when i'm delete all data of this table, the address display frontend site as well...why??
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.
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.
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.
But, I have problem, when i add new address the data is display front-site but not stored in database "hikashop_address" table...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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)
Please Log in or Create an account to join the conversation.
www.ipage.com/support/tutorials/view_tutorial.bml?kbid=5938
Please Log in or Create an account to join the conversation.
#hikashop_checkout_address_left_part in billing display??
Please Log in or Create an account to join the conversation.
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.
Please tell me how to specify Billing And Shipping address.
Thanks....
Please Log in or Create an account to join the conversation.
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.