Prices not showing on API created variable products.
-
I’ll try and be brief.
No plugins other than woocommerce activated.
Theme is 2016.I am using the API to create variable products with up to 11 variations. Inventory is managed at variation level.
Each variation has it’s own price, description and inventory level.
My test products have all loaded correctly, variations all appear as desired, prices and inventory levels at variations level all good, but on the products listing in the back-end they show without prices.The same on the product view page, no prices at all are displayed.
To try and see what was happening/wrong, I manually added a variable product (all prices displayed correctly) and then repeated the upload using the API and my script (No prices shown).
I then downloaded each product’s details and compared. There were minor differences (datestamps, ids etc) but they were essentially the same except for two things:
The variations on the manually created version were in the reverse order to the API created version and:
The permalink on the API version looked like this:
[permalink] => https://trisidian.com/product/black-onyx-8mm-cube-2/?attribute_quantity=Single+Items
And on the original created version looked like this:
[permalink] => https://trisidian.com/product/black-onyx-8mm-cube/?attribute_pa_quantity=single-item
I’m assuming/guessing that I am perhaps setting product attributes when I really want to be using a global attribute(?). However if I can get the prices displayed I can live with it for now.
I’ll continue to try and debug this myself, but if anyone has a thought, or even better, a solution :), I would be very grateful to hear it – this is my final hurdle!
Dennis
- The topic ‘Prices not showing on API created variable products.’ is closed to new replies.