I'm trying to setup ecommerce.module. So far it's working great, but I've run into a problem with the parcel product type. I've tried creating a parcel to wrap 3 shippable products that I know are in stock, and a different one that contains just one software (downloadable) product. In both cases, the parcel product is listed as "out of stock". It doesn't matter if I have stock tracking enabled or not, or what the number in stock is for the shippable products; the parcel product is always "out of stock", even though it otherwise seems to function properly.

Is this something I am doing wrong or a bug or both?

Comments

syllance’s picture

Hello,

I'm also experiencing the "sold out" problem for parcel products. It always happens, doesn't matter what products are in (with/without inventory, shippable/unshippable).

My setup is Drupal 4.6.3, with the 4.6.0 ecommerce module installed (all contrib modules are installed too : auction,submanage,...). I've quickly setup the ecommerce-cvs version downloaded from the drupal site, and the problem remains (all db tables were dropped and recreated using the cvs version).

Before starting further testing and code checks to see what happens, I wanted to know if there's anything new on this issue. Did you manage to add to cart a parcel product ?

Thanks,

Crell’s picture

No, I haven't. The client I was going to be implementing this for has decided to sit and wait and take forever to decide, so I've sidelined this for now. :-) If it ever gets fixed, please do let me know.

q0rban’s picture

Is there anyone willing to work on this?

I found a temporary workaround. If you put in the description an 'add to cart' link like so:

<a href="?q=cart/add/[nodenumber]">add to cart</a>

where [nodenumber] is the node of the parcel..

This seems to work, as the product then showed up in my shopping cart...

But, it still says "sold out" at the bottom.

q0rban’s picture

Status: Active » Needs work
StatusFileSize
new548 bytes

Well, here is a patch I made. I've never made a patch before, so I hope it works..

The problem I found is that the parcel module checks the inventory of each product within a parcel, but then still returns 'false' at the end of the 'while' loop. The patch I made returns 'false' (ie, not in stock) for the whole parcel if any product within it is not in stock. My PHP knowledge is limited, so please revise/simplify this patch.

Hope this helps!!

cheers

matt westgate’s picture

We use diff -u when creating Drupal patches. Can re-roll this patch? More instructions can be found here.

syllance’s picture

StatusFileSize
new1.2 KB

I've manually applied q0rban patch, and it seems to work, so i've rolled the patch with a cvs diff -u.

file is attached.

q0rban’s picture

Thanks everyone.. sorry for not patching properly...

cheers

syllance’s picture

Status: Needs work » Needs review

thanks to you for the patch itself :)

we learn everyday, and today i've learned how to make issues appearing in patch queues by setting their status to higher level, so i'm moving this to patch code needs review :)

matt westgate’s picture

Status: Needs review » Fixed

Committed to 4.6 and HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)