Add data to product table on checkout

  • Posts: 27
  • Thank you received: 0
5 years 7 months ago #298369

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.3
-- PHP version -- : not sure
-- Browser(s) name and version -- : chrome

Were trying to add info to columns in the database tied to products on checkout and having issues doing so. How can we structure the posted data to be added to the product table? Thank you!

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
5 years 6 months ago #298375

Hi,

I'm not sure what you mean ?
If you want to add new columns of information in either the "hikashop_order" table (tied to the order), you can create custom fields of the table "order". Then, if the name of your input corresponds to the name the custom field would use and that you replace the display of the custom fields by your HTML, you can have the save of the fields view of the checkout workflow save all your data automatically.
For the "hikashop_order_product" table (tied to the products in the order), there is no save in the checkout for that information so that means you would have to handle the saving yourself.

I would personnally recommend, you add your columns in the tables yourself and develop a plugin to add a new view to the checkout workflow with the "checkout API" of HikaShop:
www.hikashop.com/support/documentation/6...tation.html#checkout
That way, you can handle the display and the saving of the data yourself through the plugin.

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

  • Posts: 27
  • Thank you received: 0
5 years 6 months ago #298430

When placing an order, we want to add some of the information directly to the order_products table, not the orders table.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
5 years 6 months ago #298446

Hi,

Well, if you want you have your own checkout view using the checkout API, like I recommend in my previous message, you can store your data temporarily in the user session, and then implement the onAfterOrderCreate in order to update the hikashop_order_product table yourself with the data from the user session.

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

  • Posts: 27
  • Thank you received: 0
5 years 6 months ago #298473

Thank you,

what are the parameters that need to be passed to that function?

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
5 years 6 months ago #298479

Hi,

You can read more about that event here:
www.hikashop.com/support/documentation/6...l#onAfterOrderCreate

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

  • Posts: 27
  • Thank you received: 0
5 years 6 months ago #298714

We have a highly modified custom site that we cant just simply upgrade and download the newest version, but we would love some of your paid features. Is there a way we can pay and upgrade, and get database codes or something to just alter the restrictions?

Thank you

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
5 years 6 months ago #298718

Hi,

I don't understand what you mean. If you purchase it, you then have all the code in the zip we give, so you can do whatever you want with it. But I don't see what you mean by "alter the restrictions" ? Which restrictions ?

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

  • Posts: 27
  • Thank you received: 0
5 years 6 months ago #298723

we cant just upgrade to your newest paid version, we have thousands of hours into our custom code so wanted to see if we pay for your subscription if we can get unlock information etc.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
5 years 6 months ago #298733

Hi,

There is no restriction or lock in the code of HikaShop. The packages of each edition of HikaShop are generated dynamically out of the same code base with filters to remove the pieces of code and the files that are not needed.
So when you have the Starter edition, there is no possibility to bypass some lock to upgrade it to the Business edition because you're missing hundreds of pieces of code here and there and at least tens of files that would be needed for the Business edition.
Even compiling you a list of all the modifications necessary to turn a Starter edition into a Business edition would take me days.
The only way to unlock all the features is to install the install package of the Business edition and thus overwrite all the core files of HikaShop.
I understand it's already too late for you at this point, but that's why we recommend to use overrides everywhere instead of hacking directly in the core files. Otherwise, you won't even be able to update your HikaShop as the update also requires the overwrite of all the files.

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

  • Posts: 27
  • Thank you received: 0
5 years 6 months ago #298832

ok thank you

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

Time to create page: 0.072 seconds
Powered by Kunena Forum