Add a column to Sales View in Backend
Sorry but could you give back more details ?
Do you still have the same custom fields published ?
Were the modification done in an override ? And not directly in a view ?
You have maybe lost the code you implemented before.
Please Log in or Create an account to join the conversation.
I upgraded to HikaShop recently businnes, previously used HikaShop essencial 2.0.0.
We perform modifications with your help. To change the view of orders. We got the results will be shown as seen in the image below:
Once the update has disappeared field code corresponding to order_product_code.
I wish to appear again.
Currently the screen is as shown below.
Please Log in or Create an account to join the conversation.
It's normal.
You made some modifications in the listing view file and that modification has been kept after the update as it was done as a view override.
But you also made a modification to the view.html.php file of the order view and that modification will be lost each time you update:
www.hikashop.com/forum/4-how-to/53045-ad...n-backend.html#66633
So you'll have to reapply it each time.
Please Log in or Create an account to join the conversation.
Thanks
Please Log in or Create an account to join the conversation.
Please provide screenshots of the changes you made so that we can see what you did.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
In the screenshot 3 (and 4) I see a little problem because there is already a table in the query with the "d" alias ; and it's the address table.
So I don't understand how the query can work properly.
I think it should be better to use another alias for the table order_product.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You also need to modify the INNER JOIN where there is the alias on the table order_product.
But the best for you will be to activate the debug mode so you will see the SQL query error message and not see an empty result for the query error.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Thanks for your patience and your knowledge .
this is the error:
JDatabaseMySQL::query: 1051 - Unknown table 'f' SQL=SELECT a.*,b.*,c.*,f.*,IFNULL(c.name,CONCAT_WS(' ',d.address_firstname,d.address_middle_name,d.address_lastname)) AS hikashop_name FROM keap_hikashop_order AS b LEFT JOIN keap_hikashop_address AS d ON b.order_billing_address_id=d.address_id LEFT JOIN keap_hikashop_user AS a ON b.order_user_id=a.user_id LEFT JOIN keap_users AS c ON a.user_cms_id=c.id WHERE (b.order_type='sale') ORDER BY b.order_id desc LIMIT 0, 20
I placed the line:
$tables = ' INNER JOIN '.hikashop_table('order_product').' AS f ON b.order_id = f.order_id';
Just after:
$tables= ' '
And working properly. I do not know if it's the right solution.
Thank you so much, Jerome.
Please Log in or Create an account to join the conversation.
It seems to be the correct solution.
Please Log in or Create an account to join the conversation.
When you upgrade Hikashop 3, this solution has stopped working correctly.
When selecting payment methods or statements, the result is not appropriate.
In payment methods, only results appear when you mark "all payment methods".
The rest goes blank.
In the case of status, they only appear in the case of enrollment (paid), as of the day of the update.
There are also results in reinstatement and in the waiting and waiting list.
In unrealized and accredited payment, they do not show results.
Is it possible to recover that functionality?
Best regards and thanks.
Please Log in or Create an account to join the conversation.
I'm sorry but this thread is two pages long, more than 2 years old and hard to read.
Can you explain precisely what you modified where ?
Because the dropdowns work just fine on my end with HikaShop 3 without any modifications.
Please understand that this is custom coding. I'm happy to help a bit, but if I have to search for you for 2 hours just to give you a solution for something which isn't a bug but some customization you want on your end, that's outside user support.
Please Log in or Create an account to join the conversation.
how I can replace the column "method of payment" for "product code" and that at the top:
echo $ this-> payment-> display ("filter_payment", $ this-> PageInfo-> filter-> filter_payment, false);
To output the filter by "Product Code" instead of "payment method".
My orders only have one product for each of them.
With the new version does not work the differentiator the sliding tabs as you can see in the attached image.
Of the previous post.
thanks
Please Log in or Create an account to join the conversation.
I am sorry but it would require a pretty big development.
You can't just put a dropdown filter like that ; you also need to create the corresponding code to read the filter value and modify dynamically the SQL query to do your filtering.
For the payment method, that's "easy" because the value is directly in the "order" table.
Now if you want to filter on the product code ; it will be much more complicated because it need to look in other tables.
So the best looks like to create a custom plugin to perform the addition of the filter and the modification of the SQL query.
www.hikashop.com/support/documentation/6...r-documentation.html
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
My partner has explained himself wrong. The changes that have been made in the panel are as follows:
- Added a column with the product code. As you can see in the following image.
- The top filter works properly.
The error happens when you select the payment method and the status on the sliders in the top right of the panel:
In the first case only appear: all forms of payment. The rest of the selections result in a blank page.
In the second case only appear:
- some results that are the post-upgrade in Enrollment.
- some results that are the ones after the update in Payment not realized.
- all results in reintegrated.
- all results on waiting list
- all the results in derelict
- all results in admission
- no results on requested
Thanks very much Jerome
Please Log in or Create an account to join the conversation.
I'm not sure if you mean that the problem you have come from your modifications you added for the support of the product_code, and thus you're asking how you should properly do the modifications to avoid that,
or if you're saying that even without your modifications you have that problem with the dropdowns at the top and yo'ure telling us that there is a bug.
If it's the first one, well it depends on how you did your modifications. Probably the problem is that the way the MySQL query has been changed is not correct when the filters of the dropdowns are added to it.
Please Log in or Create an account to join the conversation.