Page 1 of 1

Adding Custom Fields for exisitng objects

PostPosted: Sat Feb 25, 2023 1:41 pm
by SBarnes
I have a customer who wants to interface Inventory attributes into WooCommerce in 7.2.1 and possibly another to Magento, whilst I can go behind the scenes and add tables for holding id's that WooCommerce creates, I was just wondering how hard it would be to make this happen through some inheritance and implementing of IJiwaCustomFields.

This does not necessarily need to work inside the user interface.

If this can be done what would be the steps?

Re: Adding Custom Fields for exisitng objects

PostPosted: Mon Feb 27, 2023 9:16 am
by pricerc
SBarnes wrote:I have a customer who wants to interface Inventory attributes into WooCommerce in 7.2.1 and possibly another to Magento, whilst I can go behind the scenes and add tables for holding id's that WooCommerce creates, I was just wondering how hard it would be to make this happen through some inheritance and implementing of IJiwaCustomFields.

This does not necessarily need to work inside the user interface.

If this can be done what would be the steps?


I don't know about Magento. But in WooCommerce, there are a few different options for mapping attributes - besides the standard WooCommerce fields, you can add categories, tags, and custom attributes. Each method has different trade-offs.

Our first attempt at WooCommerce integration used a "mapping" table and a periodic sync with WooCommerce. This wasn't "real-time enough" for the customer.

So our current integration, instead of a mapping table, uses a custom field in WooCommerce to hold the Jiwa InventoryId for a product, and we have the 5 inventory categories mapped to custom attributes. The sync process happens in real-time using the REST API and WebHooks.

This has been more reliable, apart from the performance problems discussed in another thread, where I believe throttling at the hosting provider has exposed some inefficiencies in our code.

The only problem we've had is that WooCommerce is case-sensitive, so if the customer changes the casing of a category name, it "confuses" things in WooCommerce, including their automated menu, which is driven from inventory categories...

We're hoping to start on our "shopping list" of improvements we want to make on our WooCommerce integration shortly.

Re: Adding Custom Fields for exisitng objects

PostPosted: Mon Feb 27, 2023 9:47 am
by SBarnes
Hi Ryan,

Likewise this is an existing integration, that already supports things like web tags, html details sections for inventory, custom fields and even multiple images for inventory with Jiwa driving things through the scheduler uploading and other information being pulled through the REST API, this is a mixed integration.

Most of it has had to be retrofitted into Jiwa 7.2.1 even though I know some of it will exist in the next version, this has meant having to add custom tables to Jiwa and where ever possible using custom fields in Jiwa to hold the ids from WooCommerce.

I have even implemented a templating system against the classification where it has HTML and you can then embed fields with @Val type arrangements like @bulltet1, @bullet2 and feed it a spreadsheet and it will filling the HTML at the product level as well as extending the import screen for products to support the extra data like web tags.

But now the customer wants to use Attributes where there are things on certain products that are not on others and like I said in my post I can add extra tables to support the ids behind the scenes as that's not hard but I was wondering may be a better angle might be to retrofit the attributes with custom fields if it can be made to happen.

Re: Adding Custom Fields for exisitng objects

PostPosted: Tue Feb 28, 2023 6:08 pm
by SBarnes
bounce

Re: Adding Custom Fields for exisitng objects

PostPosted: Wed Apr 05, 2023 6:56 pm
by Mike.Sheen
SBarnes wrote:bounce


I believe the convention is to bump, not bounce.

SBarnes wrote:I was wondering may be a better angle might be to retrofit the attributes with custom fields if it can be made to happen.


I'm still no wiser as to what it is you're trying to do.

Re: Adding Custom Fields for exisitng objects  Topic is solved

PostPosted: Wed Apr 05, 2023 6:58 pm
by SBarnes
It doesn't matter I solved it in a different wy.