質問

私はMagentoプロジェクトの要件に会いました。これによると、購入時に特定の顧客グループに特別な割引を提供する必要があります。この割引は、その特定のグループに属し、ユーザーがその特定の割引を使用したい場合、そのアイテムの価格をその割引オファーに従って割引する必要があります。

私は顧客グループを作成する方法を知っていますが、どのようにして彼らに望ましい割引を与え、購入時にそれを見せることができますか。顧客がそれを使用できるように。

方法を提案するか、ドキュメントを参照してください。

ありがとう!

役に立ちましたか?

解決

「購入時」を表示するには割引が必要なので、 ショッピングカートの価格 ルール から プロモーション メニュー。特定の顧客グループに制限される可能性があります。

a 顧客のグループ アカウントを編集して設定できます 顧客>顧客の管理 メニュー、次に見てください 口座情報 のために 顧客グループ コントロール。

私が与えたリンクは、両方ともMagentoユーザーガイドからのものです。すべて読んでください。
http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_s_guide/welcome_to_the_magento_user_s_s_guide

他のヒント

<?php
/**
 * Get the resource model
 */
$resource = Mage::getSingleton('core/resource');

/**
 * Retrieve the read connection
 */
$readConnection = $resource->getConnection('core_read');

/**
 * Retrieve current users groupId
 */
$currentUserGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();

/**
 *  Creating the custom query to fetch coupons
 */
$query =    '
                SELECT sr.rule_id, sr.name, sr.is_active, src.code, src.expiration_date
                FROM `salesrule` sr
                JOIN `salesrule_coupon` src ON (sr.`rule_id` = src.`rule_id`)
                JOIN `salesrule_customer_group` scg ON(scg.`rule_id` = src.`rule_id`)
                where scg.customer_group_id = '.$currentUserGroupId.'
                AND sr.is_active = 1
                AND (  ( src.expiration_date is null ) or ( src.expiration_date > now() ) )
            ';
//store result set in $rules
$rules = $readConnection->fetchAll($query);

// $rules will contain the array of all the coupons available to the current user


// This array contains all the data required
print_r($rules);

?>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top