Hi,

This module is a lifesaver. I too have been looking for a pay per node solution for ages and this really does what all those other long complicated recipes do and more...

I can't wait until product attributes are supported but until then I have managed to find a workaround for selling impression based advertising using the product quantity field.

I created a different content type for each type of advert (button, banner and premium) that links to a product for each with a different price per impression (35c, 50c and 75c)
The default quantity for each is then set at 1000 which can be changed to the desired amount of impressions

It works well in most instances but it seems when a product is added via Node Checkout the default quantity value is lost and a default of 1 is applied to each product making them appear in the cart as 35c, 50c, and 75c.... not a good way to make money :)

The reason this is filed as a bug report is that I think the module should reflect the default quantity specified in the product settings when being added.

If its not a bug report and rather a feature request then maybe someone can assist me with a bit of helpful code to achieve this...

Thanks in advance....
Gregg

Comments

iaminawe’s picture

Hi,

I found the following line of code that I though I would be able to override the default quantity with

$extra = module_invoke_all('add_to_cart_data', array('nid' => $product_nid, 'qty' => 1));

If I change this to
$extra = module_invoke_all('add_to_cart_data', array('nid' => $product_nid, 'qty' => 1000));

I would have thought that when I added the content type, the product associated through node to checkout would now be added with a qty of 1000.

When I test it however I noticed that it still deafults to a qty of 1. Any ideas why this would not work?
Is there another setting I need to override to achieve this?

Thanks
Gregg

iaminawe’s picture

anyone? This shouldnt be too hard...

What could I be doing wrong or still need to do to set the default qty to 1000

iaminawe’s picture

bump bump

rszrama’s picture

Status: Active » Fixed

Patched in both 5.x and 6.x branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.