Please add the "Bid increment and increase overrides" options like on uc_auctions...
I think the best way to do this is adding a field for each of the 4 options so the users will only add them if they need them.
Add this options to the Auctions Administration as well.

CommentFileSizeAuthor
#2 bid_increment.png41.58 KBxpete
#2 bid_limits.png48.91 KBxpete

Comments

farhadhf’s picture

Hi, I have no Idea what "Bid increment and increase overrides" is!

What functionality does this provide?

Regards
Farhad

xpete’s picture

StatusFileSize
new48.91 KB
new41.58 KB

Attached is a screenshot of "Bid increment and increase overrides" on uc_auctions and "bid limits" on uc_auctions administration page.
The functionality is described on the screenshot.
Please do a ubercart instalation with uc_auctions to use as a feature reference to your module... You can even use some of it's code.

farhadhf’s picture

I just committed "Bid increment and increase global options", I'll work on per-auction options tomorrow.

farhadhf’s picture

Added 4 fields to the auction display types, allowing each auction to override global bid limit settings.

you'll have to deselect the auction display type, save, and select it again so that the new fields are added to the content type.

P.S. You can deselect the auction display type by holding Ctrl key while clicking on the selected item!

Cheers

xpete’s picture

Please make the fields optional
Add the "Site-wide configuration value" to the description.
And make this fields available in a way I can add and remove them from the content type without using the Auction administration page.
Thx

xpete’s picture

and make the "Number" field a requirement.

farhadhf’s picture

What "Number" field?

make this fields available in a way I can add and remove them from the content type without using the Auction administration page.

I could create only the field itself and not add any instances to content types, If you want to have them on any auction display content type, you'll have to add them yourself, Is this what you need?

xpete’s picture

What "Number" field?

The "number" module included in Drupal core. I got an error because i didn't had it enable... so it's better to set it as a requirement.

I could create only the field itself and not add any instances to content types, If you want to have them on any auction display content type, you'll have to add them yourself, Is this what you need?

Yes.

farhadhf’s picture

It seems that Drupal removes fields with no instance automatically...
Anyway, You can remove any of these 4 fields if you don't want them to be there, I added a few checks to allow commerce auction to work without these fields.

Added Number module to dependency list.
Added global bid limit values to bid limit field description.

xpete’s picture

Anyway, You can remove any of these 4 fields if you don't want them to be there, I added a few checks to allow commerce auction to work without these fields.

Can you add to the documentation how to recreate them without using the administration page? the same thing you already have for the other fields.

Added global bid limit values to bid limit field description.

Can you put it on the beginning of the descriptions? just like in the bid_increment.png. Makes it easier to find.

farhadhf’s picture

OK,
I changed field names to field_bid_increment, field_min_bid_inc, field_max_bid_inc and field_max_bid_inc_percent.
So you can simply add or remove the fields using the field ui.

Global values are now shown at the beginning of the field description.

xpete’s picture

I didn't tried this yet but i checked the code and I think it would be better if you do this:
- make this fields 'required' => TRUE
- Change the behavior from Set to -1 to disable for this auction. Set to 0 to use global auction settings.' to Set to 0 to disable for this auction.' and when the value is not set the global value is used.
- Change (@value) to Site-wide configuration value: %value<br />

thx

xpete’s picture

I tried and... can this be done in the same way as the "bid_amount" field? I tried it and I can add and remove it..

farhadhf’s picture

-make this fields 'required' => TRUE
-Change the behavior from Set to -1 to disable for this auction. Set to 0 to use global auction settings.' to Set to 0 to disable for this auction.' and when the value is not set the global value is used.

if the field is required, it can should have a value when submitted... So I can't both make it required and allow the user to use global options without setting a value.

can this be done in the same way as the "bid_amount" field?

What do you mean?

Cheers
Farhad

xpete’s picture

Version: » 7.x-1.x-dev

I was waiting for you to fix this and I only noticed today that you repied to this... sorry...

-make this fields 'required' => TRUE

My mistake, I mean "-make this fields 'required' => FALSE
Sorry again.

What do you mean?

I mean "make this fields available in a way I can add and remove them from the content type without using the Auction administration page." the same way the "bid_amount" field works. I didn't checked the code.