Needs review
Project:
Ubercart Auction
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2013 at 10:42 UTC
Updated:
25 Sep 2016 at 06:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Abo-1 commentedComment #2
longwaveWhat do you mean by "auction post"? If you are using uc_auction or a similar module, then this issue probably needs to be fixed in that module.
Comment #3
Abo-1 commentednope ,
if you create a product "as sell not auction" it's ok. no errors
but if you create a product as "Auction" you got that error.
So.... I think the problem in uc_auction
Comment #4
tr commentedComment #5
wildlife commentedI'm having the same problem trying to set up an auction product.
Notice: Undefined index: display_price in uc_taxes_entity_view_alter() (line 114 of xxxxx/modules/ubercart/uc_taxes/uc_taxes.module).
Notice: Undefined index: #value in uc_taxes_entity_view_alter() (line 114 of xxxxx/modules/ubercart/uc_taxes/uc_taxes.module).
Comment #6
kim51 commentedI'm having the same problem.
I investigated the cause of the Notice.
This is occurred when "auction settings(on the each product edit) -> This is an auctioned product." is checked.
So I printed $build by using dsm like below.
function uc_taxes_entity_view_alter(&$build, $entity_type) {
dsm($build);
If "This is an auctioned product."(in short auction option) is checked ,
I couldn't find 'display_price' and could find uc_auction.
If the auction option is not checked ,
I could find 'display_price' and couldn't find uc_auction.
So I changed code to
when only the auction option is not checked ,
"if" phrase is executed.
It's like below.
before:if (uc_product_is_product($build['#node'])) {
after:if (uc_product_is_product($build['#node']) and empty($build['uc_auction'])) {
...
As doing like above,
the "Notice :Undefined index: display_price" is disappeared.
I know it's not right way.
but I don't know what is $build['display_price']['#value'],
where , how and when it is used.
Comment #7
loziju commentedI'm not familiar with the whole ubercart architecture. But I need to fix this error. So either I fix it in the main ubercart or in uc_auction. As uc_auction is a smaller module, thus changing few lines of codes in uc_auction is not as critical as changing few lines of codes in main ubercart modules. Furthermore, the suspect code in uc_auction is concentrated in few lines.
Here's the patch. Instead of unsetting the 3 array elements, use
#accessproperty to hide the 3 elements for auctionable products. With this, the original array elements required by ubercart are not disturbed.