price linked to role

Events happening in the community are now at Drupal community events on www.drupal.org.
tomsm's picture

Hi,

I am new to Drupal and I want to create an online catalog with ec4 and drupal 6.
I want to show the price of each product based on the visitor's role, such as retail, reseller, export client.
I do not mean discount. Each product has 3 prices.
When the user does not login, no price is shown.

Btw, can you please tell me where I can find more documentation or manuals for e-commerce?
This would make it easier to start building my site.

Thank you.

Comments

There used to be the ec_role

jax's picture

There used to be the ec_role module for a role-bounded price. I'm pretty sure you'll have to port it to ec4/d6 if you want to use it.

ec_role port to Drupal 6

tomsm's picture

Is it difficult for a beginner to port this module to drupal 6?

Well, it depends on how

jax's picture

Well, it depends on how skilled you are and how much time you have. But as I said on drupal.be (http://drupal.be/node/1917), you don't need ubercart or e-commerce to achieve what you want. You're making it more difficult than it has to be.

I am sorry. I did not read

tomsm's picture

I am sorry. I did not read your comment on drupal.be yet. Thanks for the tip!

role discount

gordon's picture

Actually it is the role discount module which just needs to be updated to Drupal 6. It is basically just a Drupal module and only implements 1 ecommerce api call hook_product_specials which will update the price.

This is not really per product, but you will see how it works and allow it to work per product. I have done it before for a client and it isn't that hard.

If you need any help just grab me in IRC and I can help you with any issue.

--
Gordon Heydon

--
Gordon Heydon

Product pricing by weight

scarvy's picture

Hello,

I'm starting to use ecommerce and have a little question. Is it possible to calculate the price of a product by weight instead of by amount?

eg, you have a piece that has a weight of 200 grams and the price by kilograms is 10 euro, so the price would be 10 * O.2 = 2 euros

(instead of calculating by amount what would have resulted in a price of 2000 euros => 10 * 200 )

I do hope that this functionality is possible

Thanks a lot in advance

Sort of. You can actually

gordon's picture

Sort of. You can actually replace the product calculation in a feature. So you could have a feature add the additional field and then do the calculation yourself, so instead of being qty x price you can do weight x price/kg. So you could actually leave the qty, and add a weight dropdown to select kg, g, tonnes etc, and then adjust the price depending on the unit of measure.

This would not be that hard, and would require no alteration of the core of ec.

--
Gordon Heydon

--
Gordon Heydon

howto

scarvy's picture

This seems to be perfect, but is there some information about how you can create a product feature, a guide or tutorial or technical paper or something because i don't know where to start...

thanks

ATM a lot of this has not

gordon's picture

ATM a lot of this has not been documented but it is fairly straight forward.

Take a look at the ec_availabity module which is a fairly good example, see http://drupalecommerce.org/api/file/ecommerce-6--4/ec_availability/ec_av... for the basic commands. The important one is hook_feature_info() http://drupalecommerce.org/api/function/ec_availability_feature_info/64 which registers the feature with the system.

If you take a look at anything calling ec_product_feature_get_function() http://drupalecommerce.org/api/function/ec_product_feature_get_function/64 is calling the feature.

If you want to document any of this please feel free.

--
Gordon Heydon

--
Gordon Heydon

subscribing

stefan81's picture

subscribing