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

Problem with Order Attributes after deploying app. #2495

Open
rust-pl opened this issue Nov 26, 2024 · 1 comment
Open

Problem with Order Attributes after deploying app. #2495

rust-pl opened this issue Nov 26, 2024 · 1 comment
Labels
bug Something isn't working Checkout UI Extensions

Comments

@rust-pl
Copy link

rust-pl commented Nov 26, 2024

Please list the package(s) involved in the issue, and include the version you are using

@shopify/app: 3.57.1
@shopify/cli: 3.57.1
@shopify/ui-extensions: 2024.1.2
@shopify/ui-extensions-react: 2024.1.2

Describe the bug

We've built an app that based on cart attribute displays specific information on Thank You and Order Status pages. Everything looks good on development store when we run tests. We use cart attributes that are set in the custom checkout links, like this: https://store.myshopify.com/cart/48162535702810:2?checkout[shipping_address][country]=UK&attributes[fslink]=44480315949225:1

When we deploy the app on production stores this is not working though - the box is not shown. Is there anything else we're missing out that should be configured specifically for production stores?

Orders on production stores do contain mentioned order attributes when we view their details.

Expected behavior

Same behavior on development and production store.

Additional context

Sample code:

import {useCallback, useEffect, useState} from 'react';
import {
  reactExtension,
  Banner,
  InlineStack,
  View,
  Heading,
  Text,
  Button,
  useStorage,
  useApi,
  useAttributeValues,
} from '@shopify/ui-extensions-react/checkout';

const thankYouBlock = reactExtension("purchase.thank-you.block.render", () => <Attribution />);
export { thankYouBlock };

function Attribution() {
let secondLink = '';
  const [lsLink] = useAttributeValues(['fslink']

  if(lsLink !== undefined) {
    secondLink += lsLink; 
  }

  let finalLink = 'https://store.myshopify.com/cart/'+secondLink;

  if(secondLink == '') {
    return null;
  }

  return (
    <View border="base" borderWidth="1" padding="base" borderRadius="base">
      <Text>Lorem Ipsum</Text>
      <InlineStack inlineAlignment="end">
          <Button kind="primary" appearance="monochrome" to={ finalLink }>Submit</Button>
      </InlineStack>
    </View>
  );
}
@rust-pl rust-pl added the bug Something isn't working label Nov 26, 2024
@jamesvidler
Copy link
Contributor

Thank you for your report. There is a known issue with some permalink metadata not persisting into checkouts and the team is looking into it. I cannot provide an estimate for when this will be resolved though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Checkout UI Extensions
Projects
None yet
Development

No branches or pull requests

2 participants