Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
435dd9d1
Commit
435dd9d1
authored
Feb 17, 2022
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_advanced_ecommerce: return useless calls
parent
7a2c616e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
46 deletions
+13
-46
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/Base_viewAdvancedECommerceThemeFieldLibrary/product_list_thumbnail.xml
...ncedECommerceThemeFieldLibrary/product_list_thumbnail.xml
+1
-16
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/Resource_getProductDecoratedPriceAsHTML.py
...nced_ecommerce/Resource_getProductDecoratedPriceAsHTML.py
+12
-6
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSite_viewAdvancedECommerceFrontPage/new_product_list_thumbnail.xml
...AdvancedECommerceFrontPage/new_product_list_thumbnail.xml
+0
-24
No files found.
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/Base_viewAdvancedECommerceThemeFieldLibrary/product_list_thumbnail.xml
View file @
435dd9d1
...
...
@@ -63,9 +63,7 @@
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
...
...
@@ -149,17 +147,4 @@
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.Resource_getWebShopImageURL()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/Resource_getProductDecoratedPriceAsHTML.py
View file @
435dd9d1
...
...
@@ -3,25 +3,31 @@ DRESSING DAILS<br />By TOM TAYLOR<br />
<span class="price">14,89 €</span>
<span class="old_price">29,95 €</span>
"""
if
not
context
.
getWebSiteValue
():
return
clean
=
0
if
context
.
REQUEST
.
get
(
"variation"
,
None
)
is
None
:
context
.
REQUEST
.
set
(
"variation"
,
context
.
REQUEST
.
get
(
"default_displayed_variation"
))
clean
=
1
price
=
cell
.
Resource_getShopPrice
()
old_price
=
cell
.
getDefaultSaleSupplyLineBasePrice
()
#
old_price = cell.getDefaultSaleSupplyLineBasePrice()
currency
=
here
.
WebSite_getShoppingCartDefaultCurrencyCode
()
title
=
cell
.
getTitle
()
if
currency
==
'EUR'
:
currency
=
'€'
elif
currency
==
'CNY'
:
currency
=
'¥'
output
=
"""%s<br /><br />"""
%
(
title
.
upper
(),)
if
old_price
is
not
None
and
price
!=
old_price
:
output
+=
"""<span class="new_price">%s %s</span>"""
%
(
price
,
currency
)
output
+=
"""<br /><span class="old_price">%s %s</span>"""
%
(
old_price
,
currency
)
else
:
output
+=
"""<span class="price">%s %s</span>"""
%
(
price
,
currency
)
#if old_price is not None and price != old_price:
# output += """<span class="new_price">%s %s</span>""" % (price, currency)
# output += """<br /><span class="old_price">%s %s</span>""" % (old_price, currency)
#else:
# output += """<span class="price">%s %s</span>""" % (price, currency)
output
+=
"""<span class="price">%s %s</span>"""
%
(
price
,
currency
)
if
clean
:
context
.
REQUEST
.
set
(
"variation"
,
None
)
...
...
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSite_viewAdvancedECommerceFrontPage/new_product_list_thumbnail.xml
View file @
435dd9d1
...
...
@@ -11,7 +11,6 @@
<value>
<list>
<string>
default
</string>
<string>
enabled
</string>
</list>
</value>
</item>
...
...
@@ -59,12 +58,6 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -88,10 +81,6 @@
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
product_list_thumbnail
</string>
</value>
...
...
@@ -123,17 +112,4 @@
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.Resource_getWebShopImageURL()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment