4 replies [Last post]
think2ice's picture
Offline
Joined: 01/21/2008
Juice: 11
Was this information Helpful?

Hello everyone,

I have an ubercart system on which I would like to have a feature linked with attributes.
Basically for the same product, I have 2 attributes (digital and non-digital). The non-digital version of the product is meant to be shippable while digital one is not.
So my questions are:
- Can ubercart set the same product to shippable (non-digital) and non-shippable (digital) at the same time?
- Can ubercat in general set the features of a given product based on its attributes? In case not, is there a contribution achieving that?

Thanks,

cYu
cYu's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/19/2007
Juice: 850
Re: Attribute based feature

Well, I can't be sure this will work because these modules aren't very well tested....but you are welcome to try a combo of 2 contrib modules I put up.

Attribute Tokens and Custom Price Calculation

The idea behind these was to be extremely flexible and perform things like you are describing without a custom module written for that specific instance.

The custom price module will add a php snippet block to your product where you can add code to be performed during the cart process and Attribute Tokens will give you access to a product's attributes from within that block. So after install of those two modules you should be able to simply add something like this to the custom code field...(assuming you have one attribute called format and 2 options, digital and non-digital and by default you set the item up as shippable)

if('[format]' == 'digital'){
  $item->data['shippable'] = 0;
}
think2ice's picture
Offline
Joined: 01/21/2008
Juice: 11
thanks cYu, i guess i got to

thanks cYu,

i guess i got to start testing them.

regards,

activelyOUT's picture
Offline
Joined: 04/20/2009
Juice: 70
Re: Re: Attribute based feature

Thanks. I have a slightly different use case where I am selling ads and want to be able to set the ad form options based on the attributes.

can't do it because attribute tokens is only available for D5 and UC 1... bummer

cYu
cYu's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/19/2007
Juice: 850
Re: Re: Re: Attribute based feature

I think it might be a straight upgrade to 6, just adding an info file. If so I'll test that out and put it up at drupal.org