Shopify themes, liquid, logos, and UX
Code given below is to check combination for product discount but its not checking that option on store. Please suggest any change for it, if there is different combination for it
$pricerule_data['title'] = $company_code.'coreactive'.$discount;
$pricerule_data['value'] = (int)$discount_value;
$pricerule_data['value_type'] ="percentage";
$pricerule_data['target_type'] = "line_item";
$pricerule_data['target_selection'] = "all";
$pricerule_data['allocation_method'] = "each";
$pricerule_data['customer_selection'] ='prerequisite';
$pricerule_data['starts_at'] = date('Y-m-d h:i:s');
$pricerule_data['customer_segment_prerequisite_ids'] =[$segment_data['id']];
$pricerule_data['entitled_collection_ids'] = [
291195289653
];
$pricerule = $this->store_object->createPriceRule($pricerule_data);
Hi Mamoon26,
I came here from your thread:
It sounds like you're frustrated that you haven't received any answers yet.
My first posts in this forum were met with crickets, which was disheartening, so I can understand where you're coming from.
Part of the reason nobody has replied is because this question lacks context and specifics.
Here are some questions that came to mind while reading this:
The list could go on.
While I can't promise you'll get the exact help you're looking for, I can guarantee that providing all the necessary context and details will make it more likely someone replies.
Best,
Tobe
Laravel PHP
coreactive is collection name
segments contains customers, who ever customer contain that segment specific discount will be applied to that customer
291195289653 is collection id
point for this code is to activate product discount combinations in discounts so multiple discounts can be applied in checkout. it works fine when i manually check that option in Product Discounts in combinations, but i want to check this option through code
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025