woocommerce / woocommerce-ios

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

Products not in published order in Order Details #5121

Closed ChrissiePollock closed 2 years ago

ChrissiePollock commented 3 years ago

Describe the bug Reported issue: Our products are no longer cross order. They were there before which was great for us it allowed us to prepare our shipments quickly unfortunately now it's totally random and therefore enormously complicated our shipment preparations Is it possible that you put them back as before.

They were there before which was great for us it allowed us to prepare our shipments quickly unfortunately now it's totally random and therefore enormously complicated our shipment preparations

The sku 1 is for us the 1 st product to encode and the more we advance in the sku the more recent products are. And since the update the products of our orders are displayed randomly.

Example->

On woocommerce It is neither in alphabetical order nor in chronological order

To Reproduce Testing done:

Publish order in WP Admin, from oldest to newest

Screen Shot 2021-09-21 at 10 15 20

Order when purchasing/adding to cart:

Screen Shot 2021-09-21 at 10 15 20(1)

Order in iOS:

IMG_616118EB730A-1

Order in Android:

wp-1632230459193

Expected behavior

The customer says the products were ordered in the past.

Mobile Environment Please include:

WordPress Environment

` ### WordPress Environment ### WordPress address (URL): https://www.livrensemble.be Site address (URL): https://www.livrensemble.be WC Version: 5.3.1 REST API Version: ✔ 5.3.1 WC Blocks Version: ✔ 4.9.1 Action Scheduler Version: ✔ 3.2.1 WC Admin Version: ✔ 2.2.6 Log Directory Writable: ✔ WP Version: ❌ 5.7.3 - Une nouvelle version de WordPress est disponible (5.8.1) WP Multisite: – WP Memory Limit: 640 Mo WP Debug Mode: – WP Cron: ✔ Language: fr_FR External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.3.29 PHP Post Max Size: 300 Mo PHP Time Limit: 60 PHP Max Input Vars: 10000 cURL Version: 7.52.1 OpenSSL/1.0.2l SUHOSIN Installed: – MySQL Version: 5.5.5-10.4.18-MariaDB-1:10.4.18+maria~stretch-log Max Upload Size: 300 Mo Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ❌ wp_remote_get() a échoué. Contactez votre fournisseur d’hébergement. ### Database ### WC Database Version: 5.3.1 WC Database Prefix: wp_670690_ Taille totale de la base de données: 1374.88MB Taille de la base de données: 1000.40MB Taille de l’index: 374.48MB wp_670690_woocommerce_sessions: Données : 46.08MB + Index : 3.02MB + Moteur InnoDB wp_670690_woocommerce_api_keys: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_woocommerce_attribute_taxonomies: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_woocommerce_downloadable_product_permissions: Données : 0.02MB + Index : 0.06MB + Moteur InnoDB wp_670690_woocommerce_order_items: Données : 2.52MB + Index : 1.52MB + Moteur InnoDB wp_670690_woocommerce_order_itemmeta: Données : 48.55MB + Index : 15.03MB + Moteur InnoDB wp_670690_woocommerce_tax_rates: Données : 0.02MB + Index : 0.06MB + Moteur InnoDB wp_670690_woocommerce_tax_rate_locations: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_woocommerce_shipping_zones: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_woocommerce_shipping_zone_locations: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_woocommerce_shipping_zone_methods: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_woocommerce_payment_tokens: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_woocommerce_payment_tokenmeta: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_woocommerce_log: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_actionscheduler_actions: Données : 35.56MB + Index : 21.97MB + Moteur InnoDB wp_670690_actionscheduler_claims: Données : 1.52MB + Index : 0.33MB + Moteur InnoDB wp_670690_actionscheduler_groups: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_actionscheduler_logs: Données : 32.56MB + Index : 12.89MB + Moteur InnoDB wp_670690_aws_cache: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_aws_index: Données : 306.83MB + Index : 148.20MB + Moteur InnoDB wp_670690_berocket_termmeta: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_braapf_product_stock_status_parent: Données : 1.52MB + Index : 0.44MB + Moteur InnoDB wp_670690_braapf_product_variation_attributes: Données : 0.02MB + Index : 0.05MB + Moteur InnoDB wp_670690_braapf_term_taxonomy_hierarchical: Données : 0.02MB + Index : 0.05MB + Moteur InnoDB wp_670690_braapf_variation_attributes: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_commentmeta: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_comments: Données : 5.52MB + Index : 3.33MB + Moteur InnoDB wp_670690_e_submissions: Données : 0.19MB + Index : 0.41MB + Moteur InnoDB wp_670690_e_submissions_actions_log: Données : 0.06MB + Index : 0.11MB + Moteur InnoDB wp_670690_e_submissions_values: Données : 0.27MB + Index : 0.09MB + Moteur InnoDB wp_670690_gens_raf: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_gens_rafmeta: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_jet_post_types: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_jet_taxonomies: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_links: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_mailchimp_carts: Données : 3.14MB + Index : 0.00MB + Moteur InnoDB wp_670690_mailchimp_jobs: Données : 194.73MB + Index : 0.00MB + Moteur InnoDB wp_670690_mollie_pending_payment: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_options: Données : 46.08MB + Index : 8.75MB + Moteur InnoDB wp_670690_postmeta: Données : 169.72MB + Index : 102.28MB + Moteur InnoDB wp_670690_posts: Données : 50.58MB + Index : 11.95MB + Moteur InnoDB wp_670690_termmeta: Données : 0.14MB + Index : 0.22MB + Moteur InnoDB wp_670690_terms: Données : 0.42MB + Index : 0.53MB + Moteur InnoDB wp_670690_term_relationships: Données : 8.34MB + Index : 4.48MB + Moteur InnoDB wp_670690_term_taxonomy: Données : 0.39MB + Index : 0.39MB + Moteur InnoDB wp_670690_usermeta: Données : 7.52MB + Index : 7.00MB + Moteur InnoDB wp_670690_users: Données : 0.33MB + Index : 0.30MB + Moteur InnoDB wp_670690_wcpdf_invoice_number: Données : 0.09MB + Index : 0.00MB + Moteur InnoDB wp_670690_wc_admin_notes: Données : 0.06MB + Index : 0.00MB + Moteur InnoDB wp_670690_wc_admin_note_actions: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_wc_category_lookup: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wc_customer_lookup: Données : 0.25MB + Index : 0.23MB + Moteur InnoDB wp_670690_wc_download_log: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_wc_order_coupon_lookup: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_wc_order_product_lookup: Données : 3.52MB + Index : 3.78MB + Moteur InnoDB wp_670690_wc_order_stats: Données : 0.31MB + Index : 0.30MB + Moteur InnoDB wp_670690_wc_order_tax_lookup: Données : 0.23MB + Index : 0.20MB + Moteur InnoDB wp_670690_wc_product_meta_lookup: Données : 4.52MB + Index : 5.44MB + Moteur InnoDB wp_670690_wc_reserved_stock: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wc_tax_rate_classes: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_wc_webhooks: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_wdr_order_discounts: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wdr_order_item_discounts: Données : 0.22MB + Index : 0.00MB + Moteur InnoDB wp_670690_wdr_rules: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wpforms_tasks_meta: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wpmailsmtp_debug_events: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wpmailsmtp_tasks_meta: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wt_iew_action_history: Données : 0.03MB + Index : 0.00MB + Moteur InnoDB wp_670690_wt_iew_cron: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wt_iew_ftp: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_wt_iew_mapping_template: Données : 0.02MB + Index : 0.00MB + Moteur InnoDB wp_670690_xoo_wl_list: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_xoo_wl_list_meta: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_yith_wcwl: Données : 1.42MB + Index : 0.19MB + Moteur InnoDB wp_670690_yith_wcwl_lists: Données : 0.08MB + Index : 0.03MB + Moteur InnoDB wp_670690_yoast_indexable: Données : 23.56MB + Index : 16.53MB + Moteur InnoDB wp_670690_yoast_indexable_hierarchy: Données : 2.52MB + Index : 3.70MB + Moteur InnoDB wp_670690_yoast_migrations: Données : 0.02MB + Index : 0.02MB + Moteur InnoDB wp_670690_yoast_primary_term: Données : 0.02MB + Index : 0.03MB + Moteur InnoDB wp_670690_yoast_seo_links: Données : 0.16MB + Index : 0.09MB + Moteur InnoDB ### Post Type Counts ### acf-field: 1 acf-field-group: 1 attachment: 30883 br_product_filter: 3 custom_css: 3 customize_changeset: 8 cwginstocknotifier: 1033 elementor_library: 3 nav_menu_item: 132 o-discount: 5 o-list: 6 oembed_cache: 1 page: 27 post: 135 product: 27298 revision: 511 seedprod: 1 shop_coupon: 85 shop_order: 2578 shop_order_refund: 13 wp_mapit_map: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (40) ### Advanced Custom Fields: par Elliot Condon – 5.9.6 Advanced Woo Search PRO: par ILLID – 2.26 All-in-One WP Migration Unlimited Extension: par ServMask – 2.42 All-in-One WP Migration: par ServMask – 7.48 Antispam Bee: par pluginkollektiv – 2.10.0 Back In Stock Notifier for WooCommerce | WooCommerce Waitlist Pro: par codewoogeek – 2.0 Bookou: par Rémy Chauveau – 1.3.1 Easy WP SMTP: par wpecommerce alexanderfoxc – 1.4.7 Elementor Pro: par Elementor.com – 3.2.2 Elementor: par Elementor.com – 3.2.3 Facebook for WooCommerce: par Facebook – 2.5.0 Tableau de bord Google Analytics pour WP (GADWP): par ExactMetrics – 6.7.0 Head, Footer and Post Injections: par Stefano Lissa – 3.2.2 Imsanity: par Exactement WWW – 2.7.2 JetEngine: par Crocoblock – 2.7.3 Jetpack par WordPress.com: par Automattic – 9.7.1 JSON API: par Dan Phiffer Ali Qureshi – 2.0.0 Kadence WooCommerce Email Designer: par Kadence WP – 1.4.7 Mailchimp for WooCommerce: par Mailchimp – 2.5.1 Mailjet for WordPress: par Mailjet SAS – 5.2.12 Mollie Payments pour WooCommerce: par Mollie – 6.4.0 Mondial Relay - WordPress: par Rodolphe Cazemajou-Tournié – 2.4 User Role Editor: par Vladimir Garagulya – 4.60 WordPress Users & WooCommerce Customers Import Export(BASIC): par WebToffee – 2.1.4 Conditional Discounts for WooCommerce by ORION: par ORION – 2.23 Woo Discount Rules: par Flycart – 2.3.7 WooCommerce PDF Invoices & Packing Slips: par Ewout Fernhout – 2.8.3 WooCommerce Sequential Order Numbers: par SkyVerge – 1.9.5 WooCommerce Shipping & Tax: par WooCommerce – 1.25.13 (une mise à jour de la version 1.25.18 est disponible) Woocommerce Side Cart Premium: par XootiX – 3.1 WooCommerce: par Automattic – 5.3.1 (une mise à jour de la version 5.7.1 est disponible) Yoast SEO: par L’équipe Yoast – 16.3 Asset CleanUp : Page Speed Booster: par Gabe Livan – 1.3.7.8 Custom Body Class: par Andrei Lupu – 0.7.2 WP MapIt: par Chandni Patel – 2.7 WP PayPal: par naa986 – 1.2.2.7 WP Rocket: par WP Media – 3.8.8 WPForms Lite: par WPForms – 1.6.9 Refer a Friend for WooCommerce PREMIUM: par WPGens – 2.3.15 YITH WooCommerce Wishlist: par YITH – 3.0.22 ### Inactive Plugins (2) ### Advanced AJAX Product Filters for WooCommerce: par BeRocket – 1.5.6 Maintenance: par WebFactory Ltd – 4.02 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left Thousand Separator: Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: advanced (advanced) book_product (book_product) external (external) grouped (grouped) simple (simple) variable (variable) 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: – ### WC Pages ### Base de la boutique: #6 - /boutique/ Panier: #7 - /panier/ Commander: #8 - /commande/ Mon compte: #9 - /mon-compte/ Conditions générales de vente et d’utilisation: #1115 - /conditions-generales-de-vente/ ### Theme ### Name: Astra Child Version: 1.0.0 Author URL: http://wpastra.com/about/ Child Theme: ✔ Parent Theme Name: Astra Parent Theme Version: 3.3.2 – 3.7.3 est disponible Parent Theme Author URL: https://wpastra.com/about/ WooCommerce Support: ✔ ### Templates ### Overrides: – ### Action Scheduler ### Canceled: 177 Oldest: 2021-09-01 21:16:06 +0200 Newest: 2021-10-02 14:32:49 +0200 Complete: 6 359 Oldest: 2021-09-17 19:37:08 +0200 Newest: 2021-10-02 14:36:10 +0200 Failed: 65 204 Oldest: 2021-02-23 17:31:47 +0100 Newest: 2021-10-02 14:36:10 +0200 In-progress: 1 Oldest: – Newest: – Pending: 8 Oldest: 2021-10-02 14:39:16 +0200 Newest: 2021-10-08 19:38:26 +0200 ### Status report information ### Generated at: 2021-10-02 14:39:40 +02:00
eduardozulian commented 3 years ago

For the record:

thehenrybyrd commented 2 years ago

Ran into this while working on UI tests for the Order Details screen (SingleOrderScreen). In wp-admin, the products are in the order in which they were published. However, on the Order Details screen, they are not in this order. I'm not sure how the order is set, but it is stable between visits to the Order Details screen for a particular order.

pmusolino commented 2 years ago

I investigated this issue, and the solution can be harder than expected. It turns out that on Android they fetch the result from API, and they do not do any sorting. Instead, on iOS, we fetch only the missing products for the order, then we use the productResultsController under OrderDetailsResultsControllers to fetch the stored products, so we sort them by name. To fix the issues, we should continue to use the productResultsController but sort the items in Core Data. Plus, we should do a refactor in the combineOrderItems that is used to combine original order items with refunded products to get a tally for the quantity and item total.