get discount_id
12 years 2 months ago - 12 years 2 months ago #164048
by kaya
get discount_id was created by kaya
Hi dear
I need get product discount_id from #__hikashop_discount table in database.
how can get discount_id a product use which discount?
thank you
I need get product discount_id from #__hikashop_discount table in database.
how can get discount_id a product use which discount?
thank you
Last edit: 12 years 2 months ago by kaya.
Please Log in or Create an account to join the conversation.
12 years 2 months ago #164052
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic get discount_id
Hi,
It depends on your discount.
You can have discount apply on a single product or discount applyed on categories (and sub categories too).
So the way to retrieve them is different depending the discount configuration.
We will need more details in order to answer you correctly.
Regards,
It depends on your discount.
You can have discount apply on a single product or discount applyed on categories (and sub categories too).
So the way to retrieve them is different depending the discount configuration.
We will need more details in order to answer you correctly.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: kaya
Please Log in or Create an account to join the conversation.
12 years 2 months ago #164089
by kaya
Replied by kaya on topic get discount_id
Thank you dear Jerome
My discount apply on a single product and I create many discount and a single product use a one discount.
now I need get discount_id for each product. how can get it?
My discount apply on a single product and I create many discount and a single product use a one discount.
now I need get discount_id for each product. how can get it?
Please Log in or Create an account to join the conversation.
12 years 2 months ago #164095
by kaya
Replied by kaya on topic get discount_id
I use this code and its work now
Code:
$product_id = (int)trim( $params->get('product_id') );
$query="SELECT discount_percent_amount,discount_flat_amount FROM `#__hikashop_discount` WHERE discount_product_id=$product_id";
Please Log in or Create an account to join the conversation.
Time to create page: 0.205 seconds