2020-03-14 18:33:08 -05:00
|
|
|
# -*- coding: utf-8; -*-
|
2020-02-28 18:12:16 -06:00
|
|
|
"""
|
|
|
|
Product views
|
|
|
|
"""
|
|
|
|
|
2022-12-10 09:21:42 -06:00
|
|
|
from webhelpers2.html import tags
|
|
|
|
|
2020-02-28 18:12:16 -06:00
|
|
|
from tailbone.views import products as base
|
|
|
|
|
|
|
|
|
2022-12-10 09:21:42 -06:00
|
|
|
class ProductView(base.ProductView):
|
2020-02-28 18:12:16 -06:00
|
|
|
"""
|
|
|
|
Product overrides for online demo
|
|
|
|
"""
|
|
|
|
|
2022-12-10 09:21:42 -06:00
|
|
|
def get_xref_links(self, product):
|
|
|
|
links = super(ProductView, self).get_xref_links(product)
|
|
|
|
|
|
|
|
if product.demo_shopfoo_product:
|
|
|
|
url = self.request.route_url('shopfoo.products.view',
|
|
|
|
uuid=product.demo_shopfoo_product.uuid)
|
|
|
|
links.append(tags.link_to("View Shopfoo Product", url))
|
|
|
|
|
|
|
|
return links
|
2020-02-28 18:12:16 -06:00
|
|
|
|
|
|
|
|
|
|
|
def includeme(config):
|
2022-11-21 22:22:46 -06:00
|
|
|
base.defaults(config, **{'ProductView': ProductView})
|