Discount Code Error | Discount codes are still loading

Juhaim
New Member
1 0 4

I tried to generate several codes via Shopify API and found that after multiple attempts the discount page stuck with loading message. 
I have attached the snap of the page.

Screenshot 2020-12-31 at 6.59.03 PM.png

ManuelLop
Excursionist
15 2 0

Hi, same problem here. Are you get an answer?

0 Likes
Tecorra
New Member
2 0 1

Same issue here. 

ManuelLop
Excursionist
15 2 0

If you find something, share it please.

0 Likes
Tecorra
New Member
2 0 1

Looks like the graphql method works. API doesnt

0 Likes
ManuelLop
Excursionist
15 2 0

Neiher API or GraphQL method works for me.... Do I need Shopify Plus to create a price rule?

0 Likes
OliUK
Shopify Partner
201 2 36

Same issue here. 

The discount codes appear in the admin, but don't work and display that place-holder screen.

...and just to add a bit more detail, I am:

  • Using an API version later than '2020-04' (when normal store API discounts started being supported)
  • I'm including 'read_discounts,write_discounts' in scope (I think I read that this was just for GraphQL, but can't hurt)
  • I'm also creating the discount through a price rule, Ruby code below.

 

 

price_rule = ShopifyAPI::PriceRule.create(
        title: "name-#{@product.variants.variant_id}",
        entitled_product_ids: [@product.id],
        target_type: "line_item",
        target_selection: "entitled",
        value: "-#{@product.variants.first.price}",
        value_type: "fixed_amount",
        allocation_method: "each",
        customer_selection: "all",
        starts_at: DateTime.now,
        discount_codes: [{ code: "such-and-such-#{@obj.xxx}"}]
      )

 

 

ManuelLop
Excursionist
15 2 0

I think it is a shopify issue. I open another topic and I'm waiting for answers

0 Likes
OliUK
Shopify Partner
201 2 36

Yeah, I think you might be right. I've just posted in the Shopify partners Slack as well. I'll report back if anything interesting gets posted!

0 Likes
ManuelLop
Excursionist
15 2 0

Please, tell me if you find something or another way to create discount or gift card from external backend

0 Likes