Magento has strong features to set Tier price. If you are interested to set multiple prices of a product for combination of customer group and product quantities, you can set by Magento Tier price option.
We can handle tier price in many ways. Here I am describing basic logic to add/update tier price in modular way. At first define all tier prices as an array. Ofcourse mind one thing about quantity. Quantity format must be four decimal precision. Like 100.0000.
For this you can use below formatting.
$qty = number_format($qty, 4, ‘.’, ”);
02 |
$tierPrices [] =
array (
|
04 |
'cust_group'
=> $customer_group_id ,
|
10 |
$tierPrices [0] =
array (
|
13 |
'price_qty'
=> 100.0000,
|
17 |
$tierPrices [1] =
array (
|
20 |
'price_qty'
=> 100.0000,
|
25 |
$productid
= Mage::getModel( 'catalog/product' )
|
29 |
$product = Mage::getModel( 'catalog/product' );
|
32 |
$product ->load( $productid );
|
35 |
$existingTierPrice
= $product ->tier_price;
|
38 |
$tierPrices = array_merge ( $existingTierPrice , $newTierPrices );
|
41 |
$product ->tier_price =
$tierPrices ;
|
Also Magento has web service API support to handle tier price. If you are expert in web service work then you can do the same thing using Magento API. To handle tier price with api call do something like below.
02 |
$sessionId
= $proxy ->login( 'apiUser' ,
'apiKey' );
|
05 |
$tierPrices
= $proxy ->call( $sessionId ,
'product_tier_price.info' ,
'Sku' );
|
08 |
$tierPrices [] =
array (
|
10 |
'customer_group_id'
=> 'all' ,
|
16 |
$proxy ->call( $sessionId ,
'product_tier_price.update' ,
array ( 'Sku' ,
$tierPrices ));
|
Posted in
Magento Products
Tagged
add tier price,
Customer group price,
Group Price,
Magento Product,
Magento tier price,
Magento tier price update,
Product price,
product tier price,
Tier price,
Tier price api,
update tier price
分享到:
相关推荐
对于MAGENTO版本<2>formatPercent($tierPriceModel->getSavePercent($price['price'])) 用。。。来代替 $tierPriceModel->getSavePercent($price['price']) 如果此扩展程序不适用于您的MAGENTO版本,请发布它。 去做...
http://www.oracle.com/technetwork/middleware/webtier/downloads/index.html Oracle WebLogic Web Server Plug-Ins 12c WebLogic Web Server Plug-In 12c is backward compatible with WebLogic Web Server ...
Tier4级别数据中心概念全文共2页,当前为第1页。Tier4级别数据中心概念全文共2页,当前为第1页。Tier4 Tier4级别数据中心概念全文共2页,当前为第1页。 Tier4级别数据中心概念全文共2页,当前为第1页。 Tier4是指...
Magento用户手册目录 第一章:Magento介绍...................................................................................................................4 Magento 的特色.................................
object 3Tier infoWorks
Sharing the Application Tier File System in Oracle Applications Release 11i (Doc ID 233428.1)
ADO.NET Sync Services in N Tier Architecture
详细描述了TC 2-Tier客户端的安装过程
Real World Java EE Night Hacks Dissecting the Business Tier http://press.adam-bien.com/ 这是一本关于JavaEE 6的PDF电子书
N-tier架构的基本设计模式
Tier Classifications Define
Usually 3-tier models are used, where one tier is the backend database engine, one is the front end client and one is just in between them, also named the application server or business logic node....
Usually 3-tier models are used, where one tier is the backend database engine, one is the front end client and one is just in between them, also named the application server or business logic node....
Usually 3-tier models are used, where one tier is the backend database engine, one is the front end client and one is just in between them, also named the application server or business logic node....
Tier Classifications Define Site Infrasturcture Performance
tier (Client/Server) setups aswell without using the remaining part of kbmMW giving you freedom in creating your application or web application the way you want to.kbmMW is a commercial product but ...
the latest version of Delphi, Version 5, includes further expansion and refinement of the 3-tier application framework introduced in Delphi 4 and has resulted in a prize-winning product. Delphi in a...
How to program three tier in Visual C# so that you can write better software
同济大学C#课程大作业,NTier。除了最基本的内容外还有一些小程序。
npm install --save multi-tier-menu 用法 import React , { Component } from 'react' import MultiTierMenu from 'multi-tier-menu' import 'multi-tier-menu/dist/index.css' class Example extends Component { ...