Skip to content

Commit 5dc2f47

Browse files
committed
update products api in the migration guide
1 parent 9d2aa3a commit 5dc2f47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/migrating-from-simple-commerce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,11 +596,11 @@ If you're listening to any of Simple Commerce's events, you will need to listen
596596
For a full list of events, please consult the [Events](/extending/events/list) page.
597597

598598
### Products
599-
Like Simple Commerce, Cargo has a `Product` facade, allowing you to fetch products.
599+
Products are entries, so you can use Statamic's [Entry Repository](https://statamic.dev/repositories/entry-repository) to query, create and update products.
600600

601-
The `Product` instances returned by Cargo's facade are thin wrappers around Statamic's `Entry` class. They add some handy helper methods around things like product variants, stock, and taxation.
601+
Cargo will define an `entry_class` on your product collections, meaning that any queries will return `Product` (or `EloquentProduct`) instances, rather than standard `Entry` instances.
602602

603-
While you can use Cargo's `Product` facade in your own code, we would recommend using [Statamic's `Entry` repository](https://statamic.dev/repositories/entry-repository) directly instead.
603+
To find out more about interacting with products in PHP, please visit the [PHP APIs](/extending/php-apis/introduction) page.
604604

605605
### Carts
606606
As mentioned earlier in this guide, carts and orders are now stored separately. You can use the `Cart` facade to find, query and create new carts:

0 commit comments

Comments
 (0)