Blank content for auction product due to missing Hook product_view() in product.module

agentc - February 9, 2007 - 01:05
Project:e-Commerce
Version:5.x-3.0-beta2
Component:auction
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When a auction product is created, all the information are missing.

I should be able to see the following inside the table:
time left
current bid
highest bid

The place bid button is missing too.

I checked that the access rules of the user is able to place bid.

#1

wojtha - February 11, 2007 - 13:02

Same problem here. I've found this piece of code in the source of auction module

<?php
// Called via product_view() which is an implementation of hook_view().
function theme_product_auction_view($node, $teaser = 0, $page = 0)
?>

The problem is that the product_view() function doesn't exist in the Drupal 5.0 version of product.module

#2

wojtha - February 11, 2007 - 19:06
Title:Missing content for auction products» Blank content for auction product due to missing Hook product_view() in product.module

Making title more accurate

Missing *place bid button* solved here: http://drupal.org/node/118076

#3

gordon - February 11, 2007 - 22:33

This is correct product_view() is no more. This is now handled by the nodeapi()

This function needs to be converted into a nodeapi function.

#4

wojtha - February 12, 2007 - 02:23
Status:active» patch (code needs work)

Hi!

I've made port to D5, using nodeapi view instead of the product_view as neclimdul and gordon advised me.

I think the code need some work to be 100% Drupal 5, but it seems to work without problems in the D5 now.

AttachmentSize
auction.module.patch11.02 KB

#5

neclimdul - February 12, 2007 - 06:54

Thanks for the start. Could you update so the latest changes are present(hook_link) and clear out the odd spaces so the patch just contains the changes you've made?

Also, could you change your editor to use spaces instead of tabs? This is compliance with the drupal coding standards. If you haven't glanced through the standards they are in the handbook. Thanks!

#6

wojtha - February 12, 2007 - 10:41

Strange thing with the tabs, I had Eclipse set to *space intendation*, I have to change tabs to spaces in some other editor.

So here is a rerolled patch against newest dev cvs DRUPAL-5--3 branch (11 Feb 2007 19:11:52 1.19.2.3.2.1.2.8). I made some structural changes, clean code a little and add few comments to the code.

AttachmentSize
auction.module_0.patch11.32 KB

#7

wojtha - February 12, 2007 - 22:23

I've been testing the patch further today, and I've found bug. Please don't use my patch for now. The problem is, that every product is now rendered as an auction ... My patch is a little alien ;-)

I'm going to fix it. Sorry for that.

#8

wojtha - February 13, 2007 - 02:22

Here is rerolled patch. I've also fixed some another bug - user, who went to checkout had to pay all of his bids, not only the winnig bids.

AttachmentSize
auction.module_1.patch10.79 KB

#9

sime - February 15, 2007 - 07:07
Status:patch (code needs work)» fixed

Thanks @wojtha !!

Great patch, I'll take that anytime.
http://drupal.org/cvs?commit=56377

#10

Anonymous - March 1, 2007 - 07:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.