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/-/bLEYQG5t9SgJ.
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.