Creating a dropdown with data

  • Posts: 26
  • Thank you received: 2
1 year 9 months ago #343362

-- HikaShop version -- : 4.6.0
-- Joomla version -- : 4.1.5
-- PHP version -- : 8.0.20
-- Browser(s) name and version -- : EDGE

Hi,

So far i managed to create custom fields on different pages and they all work fine, but i want to step my game up and do something extra.

At this moment we copy the order and delete the backorder item from the first order and change the status to sent. With the copy we delete the sent item and change the status to backorder, but thats too much of a hassle.

How can i create a dropdownlist(multiple selection or even checkboxes) where you can select the products that have been ordered by a customer and set them as backorder. So actually the dropdownlist or checkboxes have been filled with the products from each seperate order.

Hope you understand what i mean in my best english.

Yours sincerely,

Alex


Best regards,
Attachments:
Last edit: 1 year 9 months ago by alexnovo.

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

  • Posts: 81513
  • Thank you received: 13066
  • MODERATOR
1 year 9 months ago #343365

Hi,

So if I understand correctly, you want to modify the "backorder" custom field, so that you can select in it products from other orders of the user of that order ?

If you're a developer, that should be no problem. You need to create a plugin implementing the "Fields API" of HikaShop ( www.hikashop.com/support/documentation/6...entation.html#fields ) to create your own type of custom fields. That way, in the events of the plugin, you can initialized the values after loading them from the database with a MySQL query basing yourself on the user_id of the user of the current order.
We have an example of a custom field type made like this in the folder plugins/hikashop/datepickerfield/ of your website as the "advanced date picker" field type you can use as a date selector for your custom field.

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

  • Posts: 26
  • Thank you received: 2
1 year 9 months ago #343443

No, ill try to explain better.

If i open a order it will show me all the products the user has ordered. But i can not deliver one, or two at the moment. Is there a way to add a custom field where i can select those items for that order i am in at that moment and set them as backordered?

At this moment i have to copy that order and remove the delivered products and set that order as backorder. That is actually too much of a hassle.


Best regards,

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
1 year 9 months ago #343446

Hello,

In our opinion, the best way to solve this type of problem is upstream and by configuring different points in your HikaShop, namely :
- Set stock for each product (in his product setting)
- And the settings like from Main tab, in Product part,
1. Display out of stock products option
2. Update the product stock on confirmed status option

Hope this will help you to prevent your current issue, and for already created order, unfortunately you can only process like you previously describe.
Sorry for this return and hoping that this will help you.

Regards

Last edit: 1 year 9 months ago by Philip.

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

  • Posts: 26
  • Thank you received: 2
1 year 8 months ago #343474

That was not really the reply i was hoping for. So actually you are telling there is no way to get the products from the order (from the database) and create a checkbox for the items in the order and the ability to check one/multiple items?


Best regards,

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

  • Posts: 26
  • Thank you received: 2
1 year 8 months ago #343483

Hi,

As an attempt to explain myself a bit better i have edited a screenshot to show what i would like to achieve.

As you can see the checkboxes represent the items from those that have been ordered. I have checked 1 item as backorder.

I would like the checkboxes to be created from the ordered items. I guess i need to do a mysql query for that?


Best regards,
Attachments:
Last edit: 1 year 8 months ago by alexnovo.

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
1 year 8 months ago #343485

Hello,

No, as Nicolas told you this will required a custom dev (thanks to a plugin), that was a way to told you that you have to use custom dev.
My solution was to avoid creating orders with products out of stock, which therefore saves you the management operations on these orders.

Making in our mind, your need unnecessary, which means that if you can't create orders if the products are limited by their stock, then this feature has no purpose anymore unless something in this feature purpose escapes us.

And so we understood the context and the use, but what we lack is the goal, and therefore certainly the context.
Sorry for this returns...
Regards

Last edit: 1 year 8 months ago by Philip.

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

  • Posts: 26
  • Thank you received: 2
1 year 8 months ago #343576

Thank you for the replies. I solved this in another way.

  • Created a custom field on the item table, named it Backorder and gave values Yes or No
  • Created a orderstatus called Partially Backorder / On delivery

  • I have added a screenshot to show how it is looking.

    Thank you for trying to help me and sorry if frustrating you.


    Best regards,
    Attachments:
    Last edit: 1 year 8 months ago by alexnovo.
    The following user(s) said Thank You: Philip

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

    • Posts: 4509
    • Thank you received: 611
    • MODERATOR
    1 year 8 months ago #343582

    Hello,

    Thanks for sharing this ! And no frustration, just it seemed clear to us that something was missing in your needs and that's why we were struggling to meet your needs.

    Glad to read you found your solution anyway.
    Regards

    The following user(s) said Thank You: alexnovo

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

    Time to create page: 0.075 seconds
    Powered by Kunena Forum