Adding Custom Fields for exisitng objects  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Adding Custom Fields for exisitng objects

Postby SBarnes » Sat Feb 25, 2023 1:41 pm

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?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Adding Custom Fields for exisitng objects

Postby pricerc » Mon Feb 27, 2023 9:16 am

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.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Adding Custom Fields for exisitng objects

Postby SBarnes » Mon Feb 27, 2023 9:47 am

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Adding Custom Fields for exisitng objects

Postby SBarnes » Tue Feb 28, 2023 6:08 pm

bounce
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Adding Custom Fields for exisitng objects

Postby Mike.Sheen » Wed Apr 05, 2023 6:56 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Adding Custom Fields for exisitng objects  Topic is solved

Postby SBarnes » Wed Apr 05, 2023 6:58 pm

It doesn't matter I solved it in a different wy.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 35 guests