我满足了我的magento项目的一项要求,因为我需要在购买时向特定客户群体提供特别折扣。 这种贴现必须反映在客户账户中,如果它们属于这一特定群体,而且当用户想要使用这一特定折扣时,必须根据向他们提供的贴现价予以折扣。
我知道如何建立一个客户团体,但我如何能够给他们希望的折扣,并在购买时显示。 因此客户可以使用。
please suggest me any method or refer any document.
感谢!
我满足了我的magento项目的一项要求,因为我需要在购买时向特定客户群体提供特别折扣。 这种贴现必须反映在客户账户中,如果它们属于这一特定群体,而且当用户想要使用这一特定折扣时,必须根据向他们提供的贴现价予以折扣。
我知道如何建立一个客户团体,但我如何能够给他们希望的折扣,并在购买时显示。 因此客户可以使用。
please suggest me any method or refer any document.
感谢!
由于你希望贴出“购买时”的贴现,请Shopping Cart Price/em> Rule。 它可以限于某些客户群体。
A customer s group can be set by editing their account from Customers > Manage Customers menu, then look in Account Information for the Customer Group control.
The links I gave are both from the Magento User Guide. Please read it all.
http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_guide/welcome_to_the_magento_user_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);
?>
When using the Magento collection method addFieldToFilter is it possible to allow filtering by NULL values? I want to select all the products in a collection that have a custom attribute even if no ...
I am new to Magento and using their API. I need to be able to get the product url from the API call. I see that I can access the url_key and url_path, but unfortunately that s not necessarily what ...
My problem is I want to change my category page layout similar as homepage I tried a lot but didn t get the answer.
I want to install a Magento extension in WAMP, but not from the Magento connect system. How can I do this? I have the module (extension) code and I already installed the sample data in the Magento ...
Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...
I was wondering if it possible to link a category to My Account . Basically I would like to make My Account more prominent, by creating a category - My Account which appears in the main menu ...
I have a ‘featured’ attribute, which has a Yes/No select-list as the admin input. I presume that the values for Yes and No are 1 and 0, as they are for every other Yes/No list. However, if I try and ...
I tried importing product images into Magento using an absolute path, but it did not work. The image was not uploaded. For example, I tried importing "http://somewebsite.com/someimage.jpg". The image ...