woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
299 stars 110 forks source link

Barcode scan maps to SKU field rather than barcode (GTIN, UPC, EAN or ISBN) field #14096

Open maydelcraft opened 5 days ago

maydelcraft commented 5 days ago

Describe the bug Scanning a product barcode in the WooCommerce iOS app does not locate the product with the matching barcode number in the database; the app instead tries to match the barcode to the product's SKU. Products in WooCommerce have both SKU and barcode (GTIN, UPC, EAN or ISBN) fields, which are different and not equivalent. SKUs are unique to each shop's internal systems, have no standard length and can include digits, letters and/or special characters such as dashes; GTIN/UPC codes are globally standard 12-digit numbers used across all retailers.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'WooCommerce app on iPhone or iPad'
  2. Tap on 'barcode scan' icon in the top left corner
  3. Point device camera at horizontal barcode to read it
  4. See error modal at the bottom of the screen: "Cannot add Product: Product with SKU "XXXXXXXXXXXX" not found." appears on the left of the modal and a "Retry" link on the the right half.

Screenshots If applicable, add screenshots to help explain your problem.

Expected behavior Scanning the barcode should locate the product with the matching number in the GTIN, UPC, EAN or ISBN) field and add it to the order. In the case of an incorrect/incomplete scan the error message modal should reference not finding a matching barcode number rather than SKU.

Isolating the problem (mark completed items with an [x]):

Mobile Environment Please include:

WordPress Environment https://maydel.com

<details><summary>System Status Report</summary>

WordPress Environment

WordPress address (URL): [Redacted] Site address (URL): [Redacted] WC Version: 9.2.3 Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site. Action Scheduler Version: ✔ 3.8.1 Log Directory Writable: ✔ WP Version: ❌ 6.6.1 - There is a newer version of WordPress available (6.6.2) WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: Apache PHP Version: 7.4.33.6 PHP Post Max Size: 100 MB PHP Time Limit: 3600 PHP Max Input Vars: 10000 cURL Version: 7.81.0 OpenSSL/3.0.2

SUHOSIN Installed: – MySQL Version: 8.0.37-29 Max Upload Size: 50 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

[REDACTED]

Post Type Counts

acf-field: 47 acf-field-group: 5 attachment: 2934 atum_purchase_order: 23 atum_supplier: 9 blocked_user: 253 custom_css: 1 giftcard: 4 nav_menu_item: 51 nf_sub: 411 oembed_cache: 11 page: 51 pos-station: 2 post: 17 product: 2628 product_variation: 2080 revision: 35 shop_coupon: 55 shop_order: 4431 shop_order_refund: 116 wcs_ruleset: 3 wp_global_styles: 1

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ✔

Active Plugins (43)

Advanced Custom Fields PRO: by WP Engine – 6.3.6 Advanced Woo Search PRO: by ILLID – 3.14 Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.3 ATUM Inventory Management for WooCommerce: by Stock Management Labs™ – 1.9.39.2 Auto Image Attributes From Filename With Bulk Updater: by Arun Basil Lal – 4.4 Better Search Replace: by WP Engine – 1.4.7 Classic Editor: by WordPress Contributors – 1.6.4 Conditional Blocks: by Conditional Blocks – 3.1.3 Conditional Shipping for WooCommerce: by Lauri Karisola / WP Trio – 3.2.0 Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.5 Fluid Checkout for WooCommerce - Lite: by Fluid Checkout – 3.2.2 GA Google Analytics: by Jeff Starr – 20240820 Gift Cards - Coupon Input: by SomewhereWarm – 2.0.0 Jetpack: by Automattic – 13.7 Klaviyo: by Klaviyo Inc. – 3.3.5

WooCommerce Load More Products: by BeRocket – 1.2.0.1 Ninja Forms: by Saturday Drive – 3.8.13 reCaptcha for WooCommerce: by I Thirteen Web Solution – 2.54 Redirection: by John Godley – 5.5.0 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.6 Safe SVG: by 10up – 2.2.6 SliceWP Add-On - Affiliate Commission Rates: by SliceWP – 1.0.6 SliceWP Add-On - Custom Affiliate Fields: by SliceWP – 1.0.2 SliceWP - WooCommerce Blocks Compatibility: by SliceWP – 1.0.0 SliceWP: by SliceWP – 1.1.20 User Role Editor: by Vladimir Garagulya – 4.64.2 Ajax add to cart for WooCommerce: by QuadLayers – 2.3.9 WooCommerce Better Usability PRO: by Moises Heberle – 1.0.55 Fraud Prevention For WooCommerce: by theDotstore – 2.2.1 Preview E-mails for WooCommerce: by Digamber Pradhan – 2.2.13 WooCommerce.com Update Manager: by Automattic – 1.0.3 Woo Composite Products: by Woo – 10.0.2 (update to version 10.1.1 is available) WooCommerce Stripe Gateway: by WooCommerce – 8.7.0 Woo Gift Cards: by Woo – 2.0.2 (update to version 2.0.4 is available) WooCommerce Measurement Price Calculator: by SkyVerge – 3.23.6 PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.8.6 WooCommerce Shipping & Tax: by WooCommerce – 2.7.0 (update to version 2.8.2 is available) WooCommerce - ShipStation Integration: by WooCommerce – 4.4.4 WooCommerce: by Automattic – 9.2.3 (update to version 9.3.3 is available) Wordfence Security: by Wordfence – 7.11.7 Yoast SEO: by Team Yoast – 23.5 WP Mail SMTP: by WP Mail SMTP – 4.1.1 WP Sync DB: by Sean Lang – 1.5

Inactive Plugins (5)

Additional Custom Emails for WooCommerce: by WPFactory – 3.0.4 Maydel Bundels Product Type: by – Order Import Export for WooCommerce Add-on: by WebToffee – 1.1.1 WooCommerce Blocks: by Automattic – 11.7.0 WP Mail Log: by WPVibes – 1.1.3

Dropin Plugins ()

advanced-cache.php: advanced-cache.php

Must Use Plugins (5)

Force Strong Passwords - WPE Edition: by Jason Cosper – 1.8.0 WP Engine Cache Plugin: by WP Engine – 1.3.1 WP Engine Seamless Login Plugin: by WP Engine – 1.6.1 WP Engine Security Auditor: by wpengine – 1.1.1 WP Engine System: by WP Engine – 6.1.1

Settings

Legacy API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: bundels (bundels) bundle (bundle) composite (composite) external (external) grouped (grouped) simple (simple) variable (variable) wgm_gift_card (wgm_gift_card)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: ✔ Enforce Approved Product Download Directories: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: –

Logging

Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 days Level threshold: – Log directory size: 3 MB

WC Pages

Shop base: #5 - /shop/ Cart: #6 - /cart/ - Contains the [woocommerce_cart] shortcode Checkout: #7 - /checkout/ - Contains the [woocommerce_checkout] shortcode My account: #8 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Maydel Version: 1.4.0 Author URL: http://venell.studio Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: maydel/woocommerce/archive-product.php version 3.4.0 is out of date. The core version is 8.6.0 maydel/woocommerce/cart/cart.php version - is out of date. The core version is 7.9.0 maydel/woocommerce/cart/mini-cart.php version 3.7.0 is out of date. The core version is 7.9.0 maydel/woocommerce/checkout/form-coupon.php version 3.4.4 is out of date. The core version is 7.0.1 maydel/woocommerce/checkout/review-order.php version 3.8.0 is out of date. The core version is 5.2.0 maydel/woocommerce/checkout/thankyou.php version 3.7.0 is out of date. The core version is 8.1.0 maydel/woocommerce/content-single-product.php maydel/woocommerce/emails/customer-processing-order.php maydel/woocommerce/emails/email-header.php version 4.0.0 is out of date. The core version is 7.4.0 maydel/woocommerce/emails/email-styles.php version 4.0.0 is out of date. The core version is 8.6.0 maydel/woocommerce/myaccount/downloads.php version 3.2.0 is out of date. The core version is 7.8.0 maydel/woocommerce/myaccount/form-login.php version 7.0.1 is out of date. The core version is 9.2.0 maydel/woocommerce/myaccount/my-address.php version 2.6.0 is out of date. The core version is 9.2.0 maydel/woocommerce/order/order-details.php version 4.6.0 is out of date. The core version is 9.0.0 maydel/woocommerce/order/order-downloads.php /nas/content/live/maydel/wp-content/plugins/woo-better-usability-pro//templates/variation-add-to-cart-button.php version 3.4.0 is out of date. The core version is 7.0.1 maydel/woocommerce/single-product.php

Outdated Templates: ❌

                    Learn how to update

Composite Products

Database Version: 10.0.2 Loopback Test: ✔ Template Overrides: –

Gift Cards

Database Version: 2.0.2 Loopback Test: ✔ Task Queueing Test: ✔

Admin

Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks pattern-toolkit-full-composability product-custom-fields remote-inbox-notifications remote-free-extensions payment-gateway-suggestions printful shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page launch-your-store

Disabled Features: experimental-blocks minified-js product-pre-publish-modal settings async-product-editor-category-field product-editor-template-system

Daily Cron: ✔ Next scheduled: 2024-10-02 21:35:34 +00:00 Options: ✔ Notes: 220 Onboarding: completed

Action Scheduler

Complete: 1,460 Oldest: 2024-09-02 00:46:12 +0000 Newest: 2024-10-02 17:25:32 +0000

Pending: 7 Oldest: 2024-10-02 21:27:10 +0000 Newest: 2024-10-08 20:42:42 +0000

Status report information

Generated at: 2024-10-02 19:40:56 +00:00

</details>

dangermattic commented 5 days ago

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.

maydelcraft commented 5 days ago

Ummm the labels are assigned by the template. I don't think I can change them....