Yes, please submit a ticket and I'll look into it.

-Chris

On Mon, Jun 18, 2012 at 10:38 AM, Darren Hollenbeck <[email protected]>wrote:

> On further investigation I see that the code which respects the
> configuration is bound to the order_success signal and is probably used in
> most cases, however that still doesn't resolve the two examples I posted
> where neither the signal code or even the correct configuration check is
> used.
>
>
> On Monday, June 18, 2012 10:11:27 AM UTC-5, Darren Hollenbeck wrote:
>>
>> I stumbled on this while doing some tweaks to my satchmo fork. Should I
>> file it as an issue in the tracker?*
>> *
>> *
>> *
>> *In satchmo-trunk/satchmo/apps/payment/modules/paypal/views.py, line 227:
>> *
>>
>>     # Added to track total sold for each product
>>     for item in order.orderitem_set.all():
>>         product = item.product
>>         product.total_sold += item.quantity
>>         product.items_in_stock -= item.quantity
>>         product.save()
>>
>> *
>> *
>> *In satchmo-trunk/satchmo/apps/payment/modules/google/notifications.py,
>> line 60:*
>>
>>     # Added to track total sold for each product
>>     for item in order.orderitem_set.all():
>>         product = item.product
>>         product.total_sold += item.quantity
>>         product.items_in_stock -= item.quantity
>>         product.save()
>>
>> *
>> *
>> *The CORRECT code, (which I only see used by the downloadable product
>> module) in satchmo-trunk/satchmo/apps/satchmo_store/shop/listeners.py,
>> line 26:*
>>
>> def decrease_inventory_on_sale(**sender, order=None, **kwargs):
>>     """Track inventory and total sold."""
>>     # Added to track total sold for each product
>>     for item in order.orderitem_set.all():
>>         product = item.product
>>         product.total_sold += item.quantity
>>        * if config_value('PRODUCT','TRACK_INVENTORY'):*
>> *            product.items_in_stock -= item.quantity*
>>         product.save()
>>
>> *
>> *
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/satchmo-users/-/Rr5PuOr3ipYJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/satchmo-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to