- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I need to be assigned by the price code according to customer group.
How can I do ?
Thank you.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @totti240282
Here are sample code for setting the price by group
$productId=10;
$groupId=1;
$productPrice=20;
$product = Mage::getModel('catalog/product')->setStoreId(0)->load(productId);
$new_price = array( array ('website_id'=>0, 'cust_group'=>$groupId, 'price'=>$productPrice));
$product->setData('group_price', $new_price); $product->save();
here are few example code
Problem solved? Click Accept as Solution!"
Qaisar Satti
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Group Price by code
It's not clear from the question what you really want to achieve.
I guess that you want to define different prices for different Customer Groups. In that case, there is section called "Group prices" on every product, just go into Admin panel, open "Edit Product" page for any product you want, and go to the Prices tab.
If this response solved your problem, click accept as solution to help others solve this issue
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Group Price by code
It is exact, but I have so many products and I can not do this by hand but I would do it by programming
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @totti240282
Here are sample code for setting the price by group
$productId=10;
$groupId=1;
$productPrice=20;
$product = Mage::getModel('catalog/product')->setStoreId(0)->load(productId);
$new_price = array( array ('website_id'=>0, 'cust_group'=>$groupId, 'price'=>$productPrice));
$product->setData('group_price', $new_price); $product->save();
here are few example code
Problem solved? Click Accept as Solution!"
Qaisar Satti