Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Jay

    (@aaronholt)

    will I need to use an add_query_vars_filter?

    Thread Starter Jay

    (@aaronholt)

    Thanks, I can see how that would work. Is there anything out there which can help me achieve this via a custom url?

    Thanks again

    Thread Starter Jay

    (@aaronholt)

    I’ve no issue doing this via PHP / MySQL, just unsure of how to do it ‘correctly’ within WordPress / WooCommerce

    Thread Starter Jay

    (@aaronholt)

    OK, thanks for all your help. I’ve created plugins for WordPress before, and I’m plenty competent with PHP, just a little unsure as to how to create the capture url / SKU function within WordPress. Say I pass a custom add-to-cart url with the SKU, how do I get WordPress to recognise that url, and then pull the necessary record from the database?

    Thanks

    Thread Starter Jay

    (@aaronholt)

    OK great. I know it makes sense, was just hoping there was a simpler solution. Is there a tutorial or example of how this might be done?

    Thanks

    Thread Starter Jay

    (@aaronholt)

    All the products are imported from a third party suppliers catalogue. Their online catalogue iframe is well organised and with imagery etc. Only reason for importing the catalogue is so WooCommerce can add the product to the cart, with its weight, to calculate shipping etc. WooCommerce is solely functioning as the cart / checkout, and not the catalogue itself. The website customers will be shopping within the iframe.

    The catalogue provided by the third party is within the iframe, and has ‘add to cart’ buttons on each product, which have the required add-to-cart url attached.

    If I had to fully import 22,000 products, including images, and update them on a monthly basis, I’d end up becoming a full time data entry clerk.

    Literally all I need to do is get WooCommerce to be able to add products using add-to-cart via SKU rather than by WooCommerce’s post-assigned ID.

    Thread Starter Jay

    (@aaronholt)

    I’ve imported the 20,000+ products, so the catalogue has been replicated (a lengthy CSV import), it’s literally just the problem of not getting WooCommerce to add-to-cart via SKU.

    Each and every product has a unique SKU, which is common between the WooCommerce catalogue of products, and that of the supplier within the iframe. The ID is independent to WooCommerce, so isn’t of any use when trying to add to cart via url.

    Option 2 would be fine in principal, so much as creating a reference table which would match up ID’s and SKU’s, but with that many products and a monthly update on the catalogue itself, it sounds like it could end up becoming very tedious.

    I know I keep harping on, but there must be a way I can manipulate the WooCommerce add-to-cart url shortcode to catch the SKU rather than the WordPress ID?

    Thread Starter Jay

    (@aaronholt)

    I know it seems like I’m being awkward, but the third party catalogue can be configured so much as the add-to-cart url which is present from their catalogue, but the unique identifier it passes is the SKU / product code for their products. All those SKU’s are already stored in the WooCommerce imported catalogue, it’s just this manipulation of the add-to-cart functionality, and allowing that url to respond to SKU instead of ID

    Thread Starter Jay

    (@aaronholt)

    The first option would be preferable, however the catalogue is hosted by the third party and it’s not possible to amend the catalogue from their end in any way. The second option does seem like it’s going to be the route I’m going to have to go down, but it seems a lot of work when all I really want to do is get the add-to-cart function to add products to the cart via the SKU stored in the database, as opposed to the ID?

    Thread Starter Jay

    (@aaronholt)

    The iframe is only to provide the catalogue. The iframe is from a supplier of my customer, so the customer is completing the transaction on the site.

    Thread Starter Jay

    (@aaronholt)

    Customers will be using WooCommerce Cart and Checkout, with a payment gateway already in place

    Thread Starter Jay

    (@aaronholt)

    It would be ideal if I didn’t have to import the entire catalogue and periodically update it, but how would WooCommerce work without it? Clearly you’re more in the know than me, so I’d love to find out how ??

    In reality, the majority of customers are probably only occasionally going to be purchasing more than one product, but there is still the potential that they would do so.

    I’ve imported the catalogue, and it all works fine while utilising WooCommerce’s imported catalogue. My issue is how I’m going to get around WooCommerce insisting on add-to-cart via id rather than being able to use the SKU code. The ID is obviously only relevant within the WordPress database, so the external third party iframe catalogue has no way of knowing that ID.

    Many thanks for your reply by the way, very interested to find out what alternative solutions you can suggest

Viewing 12 replies - 1 through 12 (of 12 total)