Using SKU instead of product id

Can the sku be passed to cli.php to get a product's info?

tim

Yes, with LiteCart 2.5.x.

What would I need to do to 2.2.8 to be able to pass the sku?

tim

Update to 2.5.x 😁 for an awesome experience.

You would need to change ent_product load() to do what 2.5.x does.

Also, make sure the regex in the API identifies a non integer value passed in the URL for an entity. I'm not by the computer to look.

Perfect!  Thanks for the hint on the regex.  That's all that was needed.  ent_product load() was similar enough in both versions that I didn't have to touch it.

Se kod på GitHub