interesting new app on Satchmo trunk

2 views
Skip to first unread message

Bruce Kroeze

unread,
Jun 26, 2008, 3:21:02 AM6/26/08
to satchm...@googlegroups.com
I've just added an interesting new application to the Satchmo trunk.  It is completely optional and backward-compatible.  Ignore it if you don't need it.

What it allows is easy product upselling/cross-selling from one page.  For example: If you were selling ebooks, you could make a checkbox on the ebook detail page allowing your customer to order the companion CD.

To use it, add "satchmo.upsell" to your INSTALLED_APPS, and run syncdb.

You'll have a new app in your admin, "upsell", which has one model "Upsell".  Upsells have "targets" and "goals".  Targets are the products you want to add upsells to.  Goals are what you are upselling.  Select them, and optionally add a description of the upsell, and select a "style" of upsell presentation.

There are five styles:
- Checkbox, qty 1, not-selected-by-default
- Checkbox, qty 1, selected-by-default
- Checkbox, qty matching the qty of the product on the page, not-selected-by-default
- Checkbox, qty matching the qty of the product on the page, selected-by-default
- or a simple form with a qty box.

The templatetag {% product_upsell product %} on product_detail templates does all the magic to handle the form.  So that way, all the user has to do is check a checkbox and they get the extra item added to their cart when they click "add to cart." I've already added it to the default store templates.

The only downside is that the goal product doesn't have any options.  It can be a be a product variation (i.e. DJ Rocks, Large, Blue), but can't be the configurable product itself.

Please let me know how it works for you.  As I said above, this should be 100% backward compatible, so ignore it if you don't want or need upselling.
--
Bruce Kroeze
http://solidsitesolutions.com
Dynamic Designs, Optimized

Talat UYARER

unread,
Jul 28, 2008, 6:28:09 PM7/28/08
to Satchmo users
When i try to upsell it says me :

talat@masaustu:~/Projeler/emall/eticaret$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/lib/python2.5/django/core/management/__init__.py", line
301, in execute_manager
utility.execute()
File "/usr/lib/python2.5/django/core/management/__init__.py", line
248, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.5/django/core/management/base.py", line 77,
in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.5/django/core/management/base.py", line 86,
in execute
translation.activate('en-us')
File "/usr/lib/python2.5/django/utils/translation/__init__.py", line
73, in activate
return real_activate(language)
File "/usr/lib/python2.5/django/utils/translation/__init__.py", line
43, in delayed_loader
return g['real_%s' % caller](*args, **kwargs)
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 209, in activate
_active[currentThread()] = translation(language)
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 198, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 181, in _fetch
app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]),
appname[p+1:])
File "/usr/lib/python2.5/satchmo/upsell/__init__.py", line 3, in
<module>
import views
File "/usr/lib/python2.5/satchmo/upsell/views.py", line 1, in
<module>
from satchmo.product.models import Product
File "/usr/lib/python2.5/satchmo/product/models.py", line 26, in
<module>
from satchmo.tax.models import TaxClass
File "/usr/lib/python2.5/satchmo/tax/models.py", line 32, in
<module>
class TaxRate(models.Model):
File "/usr/lib/python2.5/django/db/models/base.py", line 89, in
__new__
new_class.add_to_class(obj_name, obj)
File "/usr/lib/python2.5/django/db/models/base.py", line 140, in
add_to_class
value.contribute_to_class(cls, name)
File "/usr/lib/python2.5/django/db/models/fields/related.py", line
672, in contribute_to_class
super(ForeignKey, self).contribute_to_class(cls, name)
File "/usr/lib/python2.5/django/db/models/fields/related.py", line
113, in contribute_to_class
self.do_related_class(other, cls)
File "/usr/lib/python2.5/django/db/models/fields/related.py", line
121, in do_related_class
self.set_attributes_from_rel()
File "/usr/lib/python2.5/django/db/models/fields/related.py", line
117, in set_attributes_from_rel
self.verbose_name = self.verbose_name or
self.rel.to._meta.verbose_name
File "/usr/lib/python2.5/django/utils/functional.py", line 188, in
__wrapper__
res = self.__func(*self.__args, **self.__kw)
File "/usr/lib/python2.5/django/utils/translation/__init__.py", line
62, in ugettext
return real_ugettext(message)
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 288, in ugettext
return do_translate(message, 'ugettext')
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 278, in do_translate
_default = translation(settings.LANGUAGE_CODE)
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 198, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/lib/python2.5/django/utils/translation/trans_real.py",
line 181, in _fetch
app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]),
appname[p+1:])
AttributeError: 'module' object has no attribute 'upsell'

what is problem ?

i use final django svn revision and satchmo revision

Chris Moffitt

unread,
Jul 28, 2008, 9:30:44 PM7/28/08
to satchm...@googlegroups.com
I'm assuming that you did a syncdb after you added the upsell application.

-Chris

talat uyarer

unread,
Jul 29, 2008, 1:51:40 AM7/29/08
to satchm...@googlegroups.com
no i dont do syncdb because it says same as problem.

2008/7/29 Chris Moffitt <ch...@moffitts.net>
Reply all
Reply to author
Forward
0 new messages