Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for fetching BigCommerce Products by SKU. Including via shortcode #266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emiliorcueto
Copy link

Adds support for fetching BigCommerce Products by SKU.

  • Adds static methods by_product_sku and query to the BigCommerce\Post_Types\Product class
  • Add default attribute of sku to the Product_Components class implementing the bc-component shortcode

Documentation

Historically, one would only be able to fetch a product with a BigCommerce Product ID
E.g. $product = \BigCommerce\Post_Types\Product\Product::by_product_id( $product_id );

This pull request adds the ability to fetch of a product in a very similar fashion by BigCommerce Product SKU
E.g. $product = \BigCommerce\Post_Types\Product\Product::by_product_sku( $product_sku );

Additionally, the bc-component shortcode attributes have been updated to support fetching by BigCommerce Product SKU as well.
E.g. echo do_shortcode('[bc-component sku="' . $product_sku . '" type="add_to_cart"]');

@karmatosed
Copy link
Collaborator

karmatosed commented Aug 30, 2024

This PR currently needs a refresh along with consideration whether still an issue. As we were triaging the repo this month, my recommendation would be to either refresh and get into the next release or to close out. If it is due to get in then I would recommend having an issue to link with it which unless I am mistaken I don't see.

cc @chanceaclark and @bc-erich

@bc-erich bc-erich assigned bc-erich and karmatosed and unassigned bc-erich Sep 10, 2024
@karmatosed karmatosed removed their assignment Sep 16, 2024
@karmatosed
Copy link
Collaborator

I am struggling to recreate this. I think this could be myself or it might be that this isn't an issue anymore. My thinking however is we need to have a few more things on this PR to ensure testing can be done and also get a refresh.

@chanceaclark
Copy link
Contributor

Agreed. @emiliorcueto would you mind providing a little more info here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants