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

How to set a discount when listing an item #35

Open
himacri opened this issue Oct 20, 2020 · 2 comments
Open

How to set a discount when listing an item #35

himacri opened this issue Oct 20, 2020 · 2 comments

Comments

@himacri
Copy link

himacri commented Oct 20, 2020

Hi,
I would like to set a discount on an item when I list it for sale.

product_data = {
"category_id": ,
"name": ,
"description": ,
"price": ,
"stock": ,
"weight": ,
"images": ,
"logistics":,
"condition":,
"item_sku":,
}

What param do I need to add?

@Squallpka1
Copy link

Squallpka1 commented Oct 21, 2020

I believe you first need to set the campaign for the discount using.
import pyshopee
client = pyshopee.Client( shop_id, partner_id, key )
client.discount.add_discount(discount_name,start_time,end_time,items)

thats items is a list of the item you want in the discount campaign.

if your item have variation.
items = [{
'item_id':
'variations':[{variation_id,variation_promotion_price}]
'purchase_limit':
}]

Althought I'm not clear how to do with item without variation. Also the 'start_time' and 'end_time' use timestamp.

source:
https://open.shopee.com/documents?module=1&type=1&id=357

@himacri
Copy link
Author

himacri commented Oct 24, 2020

Thank you for your reply.
I wanted to know how to add an item to an already created discount setting.
There are no variations.

I will also check it myself.

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

No branches or pull requests

2 participants