Commit 3d19f4a5 authored by Yoshinori Okuji's avatar Yoshinori Okuji

obsolete, use erp5_commerce instead


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20722 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a8fb43f0
##############################################################################
# Copyright (C) 2001 MMmanager.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
##############################################################################
"""
"""
ADD_CONTENT_PERMISSION = 'Add portal content'
import Globals
from zLOG import LOG
from Products.CMFCore import CMFCorePermissions
from Products.CMFCore.CMFCorePermissions import View
from Products.CMFCore.CMFCorePermissions import ManageProperties
from AccessControl import ClassSecurityInfo
from Products.CMFCore.PortalContent import PortalContent
from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
from DateTime.DateTime import DateTime
from Products.ERP5Shop.Document.ShopProduct import ShopProduct
from ZODB.PersistentMapping import PersistentMapping
from Products.Base18.Document import Document18
from Products.ERP5Shop.Document.ShopOrder import ComputerVariantValue
factory_type_information = {
'id': 'Computer Product',
'meta_type': 'Storever Computer Product',
'description': 'Use products to create an online shopping catalog',
'product': 'StoreverShop',
'icon': 'file_icon.gif',
'factory': 'addComputerProduct',
'filter_content_types': 0,
'immediate_view': 'computerproduct_edit_form',
'actions':
({'name': 'View',
'id': 'view',
'action': 'computerproduct_view',
'permissions': ('View',),
'category': 'object'},
{'name': 'Edit',
'id': 'edit',
'action': 'computerproduct_edit_form',
'permissions': ('Modify portal content',),
'category': 'object'})
}
def SecondSort(a,b):
if a[1] > b[1]:
return 1
if a[1] < b[1]:
return -1
return 0
class ComputerProduct( ShopProduct, Document18 ):
"""
ComputerProduct implements the first version
of Storever online shop. It uses a very badly designed
variation value system (a mix of tuple and dictionnary) and
hard codes options. It should not be considered as a model.
"""
meta_type='Storever Computer Product'
portal_type='Computer Product'
effective_date = expiration_date = None
_isDiscussable = 1
price = 0.0
thumbnail = ''
image = ''
isCredit = 0
credits = 0
delivery_days = 0
disk_price = {}
memory_price = {}
option_price = {}
processor_price = {}
default_variant = (80,1,128,1,(),'default partition','default task')
text = ''
security = ClassSecurityInfo()
def __init__( self
, id
, title=''
, description=''
):
DefaultDublinCoreImpl.__init__(self)
self.id=id
self.title=title
self.description=description
self.delivery_days=0
self.processor_price = PersistentMapping()
self.disk_price = PersistentMapping()
self.memory_price = PersistentMapping()
self.option_price = PersistentMapping()
self.text = ''
def newVariationValue(self, context=None, variant=None, **kw):
if context is not None:
if hasattr(context, 'variant'):
return ComputerVariantValue(context.variant)
else:
return None
elif variant is not None:
return ComputerVariantValue(variant)
else:
return None
def SearchableText(self):
"""
text for indexing
"""
return "%s %s" % (self.title, self.description)
security.declareProtected(ManageProperties, 'editProduct')
def editProduct(self,
title=None,
description=None,
price=None,
isCredit=None,
credits=None,
category=None,
delivery_days=None,
product_path=None,
text=None):
if title is not None:
self.setTitle(title)
if description is not None:
self.setDescription(description)
if price is not None:
self.price = price
if isCredit is not None:
if isCredit == '1':
self.isCredit = 1
else:
self.isCredit = 0
if product_path is not None:
self.product_path = product_path
if credits is not None:
self.credits = int(credits)
if category is not None:
self.setSubject(category)
if delivery_days is not None:
self.delivery_days = int(delivery_days)
if text is not None:
self.text = text
self.reindexObject()
security.declareProtected(ManageProperties, 'setProcessorPrice')
def setProcessorPrice(self, size, price):
self.processor_price[size] = price
security.declareProtected(ManageProperties, 'setDiskPrice')
def setDiskPrice(self, size, price):
self.disk_price[size] = price
security.declareProtected(ManageProperties, 'setMemoryPrice')
def setMemoryPrice(self, size, price):
self.memory_price[size] = price
security.declareProtected(ManageProperties, 'setOptionPrice')
def setOptionPrice(self, option, price):
self.option_price[option] = price
security.declareProtected(View, 'getProcessorSizes')
def getProcessorSizes(self):
if not hasattr(self,'processor_price'):
self.processor_price = PersistentMapping()
return filter(lambda s: s.find('DISCONTINUED') <0, self.processor_price.keys())
security.declareProtected(View, 'getDiskSizes')
def getDiskSizes(self):
if not hasattr(self,'disk_price'):
self.disk_price = PersistentMapping()
return filter(lambda s: s.find('DISCONTINUED') <0, self.disk_price.keys())
security.declareProtected(View, 'getMemorySizes')
def getMemorySizes(self):
if not hasattr(self,'option_price'):
self.memory_price = PersistentMapping()
memory_price = self.memory_price
return filter(lambda s: s.find('DISCONTINUED') <0, memory_price.keys())
security.declareProtected(View, 'getOptions')
def getOptions(self,pattern=''):
if not hasattr(self,'option_price'):
self.option_price = PersistentMapping()
result = filter(lambda s,p=pattern: s.find(p) >= 0, self.option_price.keys())
return filter(lambda s,p=pattern: s.find('DISCONTINUED') <0, result)
security.declareProtected(View, 'getProcessorValues')
def getProcessorValues(self):
"""
Return a sequence of tuples (option,price)
"""
diskvalues = map(lambda i,product=self: (i, product.getProcessorPrice(i)),
self.getProcessorSizes())
diskvalues.sort(SecondSort)
return diskvalues
security.declareProtected(View, 'getMemoryValues')
def getMemoryValues(self):
"""
Return a sequence of tuples (option,price)
"""
diskvalues = map(lambda i,product=self: (i, product.getMemoryPrice(i)), self.getMemorySizes())
diskvalues.sort(SecondSort)
return diskvalues
security.declareProtected(View, 'getDiskValues')
def getDiskValues(self):
"""
Return a sequence of tuples (option,price)
"""
diskvalues = map(lambda i,product=self: (i, product.getDiskPrice(i)), self.getDiskSizes())
diskvalues.sort(SecondSort)
return diskvalues
security.declareProtected(View, 'getOptionValues')
def getOptionValues(self,pattern=''):
"""
Return a sequence of tuples (option,price)
"""
diskvalues = map(lambda i,product=self: (i, product.getOptionPrice(i)),
self.getOptions(pattern))
diskvalues.sort(SecondSort)
return diskvalues
security.declareProtected(View, 'getProcessorPrice')
def getProcessorPrice(self,size):
return self.processor_price[size]
security.declareProtected(View, 'getDiskPrice')
def getDiskPrice(self,size):
return self.disk_price[size]
security.declareProtected(View, 'getMemoryPrice')
def getMemoryPrice(self,size):
return self.memory_price[size]
security.declareProtected(View, 'getOptionPrice')
def getOptionPrice(self,size):
if self.option_price.has_key(size):
return self.option_price[size]
# Make sure this is not a discountinued option
elif self.option_price.has_key('%s DISCONTINUED' % size):
return self.option_price['%s DISCONTINUED' % size]
else:
return 0
security.declareProtected(ManageProperties, 'deleteProcessorPrice')
def deleteProcessorPrice(self,size):
del self.processor_price[size]
security.declareProtected(ManageProperties, 'deleteDiskPrice')
def deleteDiskPrice(self,size):
del self.disk_price[size]
security.declareProtected(ManageProperties, 'deleteMemoryPrice')
def deleteMemoryPrice(self,size):
del self.memory_price[size]
security.declareProtected(ManageProperties, 'deleteOptionPrice')
def deleteOptionPrice(self,size):
del self.option_price[size]
def editThumbnail(self, thumbnail=None):
if thumbnail is not None:
self.thumbnail = thumbnail
def editImage(self, image=None):
if image is not None:
self.image = image
def _getPrice(self, context):
"""
Compatibility
"""
LOG("Context of Product", 0, str(context.__dict__))
if hasattr(context,'variant'):
return self.computePrice(context.variant)
else:
return self.price
security.declareProtected(View, 'computePrice')
def computePrice(self, variant):
"""
variant is defined as:
(color,processor,memory,disk,options,setup,config_url,
root,boot,usr,home,var,tmp,swap,free)
"""
processor_type = variant[1]
memory_type = variant[2]
disk_type = variant[3]
base_price = self.price
if self.processor_price.has_key(processor_type):
base_price += self.processor_price[processor_type]
# Make sure this is not a discountinued option
elif self.processor_price.has_key('%s DISCONTINUED' % processor_type):
base_price += self.processor_price['%s DISCONTINUED' % processor_type]
else:
processor_type = self.processor_price.keys()[0]
base_price += self.processor_price[processor_type]
variant[1] = processor_type
if self.disk_price.has_key(disk_type):
base_price += self.disk_price[disk_type]
# Make sure this is not a discountinued option
elif self.disk_price.has_key('%s DISCONTINUED' % disk_type):
base_price += self.disk_price['%s DISCONTINUED' % disk_type]
else:
disk_type = self.disk_price.keys()[0]
base_price += self.disk_price[disk_type]
variant[3] = disk_type
if self.memory_price.has_key(memory_type):
base_price += self.memory_price[memory_type]
# Make sure this is not a discountinued option
elif self.memory_price.has_key('%s DISCONTINUED' % memory_type):
base_price += self.memory_price['%s DISCONTINUED' % memory_type]
else:
memory_type = self.memory_price.keys()[0]
base_price += self.memory_price[memory_type]
variant[2] = memory_type
setup = variant[5]
if setup != '':
base_price = base_price + self.getOptionPrice(setup)
options_price = 0
for option in variant[4]:
if option != '':
options_price = options_price + self.getOptionPrice(option)
return (base_price + options_price)
security.declareProtected(View, 'renderVariant')
def renderVariant(self, variant, REQUEST=None):
option_text = ''
for option in variant[4]:
if option != '':
option_text = option_text + "<li>%s</li>" % option
return "<p>Hardware:</p>" \
"<ul><li>Color: %s</li><li>Processor: %s</li><li>Memory: %s</li><li>Disk: %s</li></ul>" \
"<p>Options:</p>" \
"<ul><li>Setup: %s</li>%s</ul>" \
"<p>Configuration URL: %s</p>" \
"<p>Partition:</p>" \
"<ul><li>/root: %s</li><li>/boot: %s</li><li>/usr: %s</li><li>/home: %s</li><li>/var: %s</li><li>/tmp: %s</li><li>/swap: %s</li><li>/free: %s</li></ul>" \
% (variant[0],variant[1],variant[2],variant[3],variant[5],option_text, \
variant[6],variant[7],variant[8],variant[9],variant[10],
variant[11],variant[12],variant[13],variant[14])
security.declareProtected(View, 'shortVariant')
def shortVariant(self, variant, REQUEST=None):
return self.newVariationValue(variant=variant).asString()
return "%s/%s/%s/%s/%s" % (variant[0],variant[1],variant[2],variant[3],variant[5])
def addComputerProduct(self, id, title='', REQUEST=None):
ob=ComputerProduct(id,title)
self._setObject(id, ob)
Globals.InitializeClass(ComputerProduct)
import cmmac
def CMLang(langue):
if langue == 'fr':
langue = 'francais'
elif langue == 'en':
langue = 'anglais'
return langue
def CreerFormulaireCM(url_banque = "https://ssl.paiement.cic-banques.fr",
version = "1.2",
TPE = "/var/www/payment/storever.key",
montant = "1EUR",
reference = "STVR1",
texte_libre = "Toto",
url_retour = "http://www.storever.com",
url_retour_ok = "https://secure.storever.com/payment/accept",
url_retour_err = "https://secure.storever.com/payment/reject",
langue = "fr",
code_societe = "storever",
texte_bouton = "Paiement par carte bancaire"):
# Create Bing String
formulaire = '1234567890' * 500
langue = CMLang(langue)
formulaire = cmmac.CreerFormulaireCM2(url_banque, version, TPE, str(montant)+'EUR', str(reference), texte_libre, url_retour, url_retour_ok, url_retour_err, langue, str(code_societe), texte_bouton, formulaire)
return formulaire
def CalculMAC(version="",
TPE="",
cdate="",
montant="",
reference="",
texte_libre="",
langue="",
code_societe=""):
# Adapt Parameters
langue = CMLang(langue)
return cmmac.CalculMAC(version,TPE,cdate,montant,reference,texte_libre,langue,code_societe)
def TestMAC(code_MAC="",
version="",
TPE="",
cdate="",
montant="",
reference="",
texte_libre="",
code_retour="Code Retour Par Défaut"):
return cmmac.TestMAC(code_MAC,version,TPE,cdate,montant,reference,texte_libre,code_retour)
def CreerReponseCM(phrase=""):
# Create Bing String
reponse = '1234567890' * 500
return cmmac.CreerReponseCM2(phrase,reponse)
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
Zope Public License (ZPL) Version 2.0
-----------------------------------------------
This software is Copyright (c) Zope Corporation (tm) and
Contributors. All rights reserved.
This license has been certified as open source. It has also
been designated as GPL compatible by the Free Software
Foundation (FSF).
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:
1. Redistributions in source code must retain the above
copyright notice, this list of conditions, and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions, and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. The name Zope Corporation (tm) must not be used to
endorse or promote products derived from this software
without prior written permission from Zope Corporation.
4. The right to distribute this software or to use it for
any purpose does not give you the right to use Servicemarks
(sm) or Trademarks (tm) of Zope Corporation. Use of them is
covered in a separate agreement (see
http://www.zope.com/Marks).
5. If any files are modified, you must cause the modified
files to carry prominent notices stating that you changed
the files and the date of any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS''
AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
This software consists of contributions made by Zope
Corporation and many individuals on behalf of Zope
Corporation. Specific attributions are listed in the
accompanying credits file.
##############################################################################
#
# Copyright (c) 2002 Jean-Paul Smets
# Copyright (c) 2002 Nexedi SARL
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version, with the special
# provision that the authors explicitly grant hereby the right to link this
# program with any versions of the Qt library including non GPL versions
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
"""
"""
ADD_FOLDERS_PERMISSION = 'Add portal folders'
import ComputerProduct
from Products.CMFCore import utils
from Products.CMFCore.DirectoryView import registerDirectory
import Products.MMMShop
# Aliases for previous mixed up version
__module_aliases__ = ( ( 'Products.MMMShop.ComputerProduct', ComputerProduct ),
)
# ...and make sure we can find them in PTKBase when we do
# 'manage_migrate_content()'.
Products.MMMShop.ComputerProduct = ComputerProduct
contentClasses = ( ComputerProduct.ComputerProduct, )
contentConstructors = ( ComputerProduct.addComputerProduct, )
bases = contentClasses
boring_globals = globals()
import sys
this_module = sys.modules[ __name__ ]
z_bases = utils.initializeBasesPhase1( bases, this_module )
#Make the skins availiable as DirectoryViews
registerDirectory('skins/storever', globals())
registerDirectory('skins/zpt_storever', globals())
registerDirectory('skins/cm_storever', globals())
def initialize( context ):
utils.initializeBasesPhase2( z_bases, context )
utils.ContentInit( 'Storever Shop Content'
, content_types=contentClasses
, permission=ADD_FOLDERS_PERMISSION
, extra_constructors=contentConstructors
, fti = (
ComputerProduct.factory_type_information, )
).initialize( context )
<dtml-var standard_html_header>
<div class="Desktop">
<p><dtml-gettext>This form allows to pay online a custom service
or order which price has been defined specifically.</dtml-gettext></p>
<h1><dtml-gettext>Order Summary</dtml-gettext></h1>
<p><dtml-gettext><b>Invoice number</b>: </dtml-gettext><dtml-var invoice_number></p>
<p><dtml-gettext><b>Grand total</b>: </dtml-gettext><dtml-var montant> EUR.</p>
<p><dtml-gettext>Please refer to the invoice you received</dtml-gettext></p>
<h3><dtml-gettext>Online Payment</dtml-gettext></h3>
<p><dtml-gettext>With our secure online payment system operated by CIC, you can simply use you credit card to pay</dtml-gettext> <dtml-if payvat><dtml-var montantvat><dtml-else><dtml-var montant></dtml-if> EUR
<dtml-gettext> online with the same or better level of security as in the real world.</dtml-gettext></p>
<center>
<dtml-let code_societe="'nexedi'"
texte_bouton="gettext('Secure Online Payment')"
langue="gettext.get_selected_language()"
TPE="'/etc/cmmac/6496547.key'"
url_banque="'https://ssl.paiement.cic-banques.fr/paiement.cgi'"
texte_libre="invoice_number"
reference="invoice_number"
url_retour_err="'payme_rejected'"
url_retour_ok="'payme_accepted'">
<dtml-var "payment.CreerFormulaireCM(url_retour_err=url_retour_err,url_retour_ok=url_retour_ok,texte_libre=texte_libre,reference=reference,code_societe=code_societe,texte_bouton=texte_bouton, langue=langue, TPE=TPE, url_banque=url_banque,montant=montant)">
</dtml-let>
<dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header>
<div class="Desktop">
<h1><dtml-gettext>Your payment has been accepted. Thank you.</dtml-gettext></h1>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header>
<div class="Desktop">
<h1><dtml-gettext>Sorry, your payment has been rejected.</dtml-gettext></h1>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
##parameters=setup_list
# Example code:
# Import a standard function, and get the HTML request and response objects.
from random import randrange
random_list0 = []
random_list1 = []
for (key, value) in setup_list:
if value == 0.0:
if randrange(0,2) == 0:
random_list0 = random_list0 + [(key , value)]
else:
random_list0 = [(key , value)] + random_list0
else:
random_list1 = random_list1 + [(key , value)]
return random_list0 + random_list1
\ No newline at end of file
## Script(Python) "addToCart"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=REQUEST=None,variant=None
##title=Add a product to the shopping cart
shopmanager = context.portal_shop_manager
product = context
cart = shopmanager.getMemberCart()
if not cart:
home = context.portal_membership.getHomeFolder()
home.invokeFactory(id='ShoppingCart', type_name='Shopping Cart')
cart = shopmanager.getMemberCart()
del_days = product.getDeliveryDays()
reqvar = 'quantity'
if REQUEST.has_key(reqvar):
quantity = REQUEST.get(reqvar)
title = "%s: %s" % (product.title, product.shortVariation(variant))
try:
quantity = int(quantity)
except:
quantity = 0
if quantity > 0:
cart.addProductToCart(prod_path=product.absolute_url(relative=1)
, prod_title=title
, quantity=quantity
, delivery_days=del_days
, mail_receive=1
, variation_value=product.newVariationValue(variant=variant)
)
status_msg = 'Cart+updated'
context.REQUEST.RESPONSE.redirect(context.local_absolute_url(target=cart) +
'/view?portal_status_message=' + status_msg)
<dtml-let lang="gettext.get_selected_language()">
<dtml-let man_obj="getShopManager()">
<dtml-if "man_obj[0] == 0">
<dtml-let portal_status_message="'No shop manager found'">
<dtml-return checkOut>
</dtml-let>
<dtml-else>
<dtml-call "REQUEST.set('manager_obj', man_obj[1])">
</dtml-if>
</dtml-let>
<dtml-call "setCurrencyParams()">
<dtml-call "setPersonalDetailsParams()">
<dtml-call "REQUEST.set('cart_obj', getShoppingCart())">
<dtml-call "REQUEST.set('all_price', getTotalPrice())">
<dtml-in "cart_obj.listProducts()" sort=delivery_days>
<dtml-if sequence-end>
<dtml-let item="_.getitem('sequence-item')"
d_days="item.getDeliveryDays()">
<dtml-call "REQUEST.set('exp_delivery_days', d_days)">
</dtml-let>
</dtml-if>
</dtml-in>
<dtml-let delivery_date="ZopeTime() + _.int(REQUEST['exp_delivery_days'])"
formatted_delivery_date="delivery_date.strftime('%Y/%m/%d')">
<dtml-call "REQUEST.set('correct_ddate', formatted_delivery_date)">
</dtml-let>
<dtml-call "REQUEST.set('loggedin_user', getMemberObj().getUserName())">
<TABLE BORDER="0" width="100%">
<FORM ACTION="<dtml-var "manager_obj.httpsRoot">/&dtml-lang;/create_order_page" METHOD="POST">
<TR CLASS="NewsTitle">
<TD CLASS="NewsTitle" COLSPAN="2"><dtml-gettext>Check Out</dtml-gettext></TD>
</TR>
<INPUT TYPE="hidden" NAME="shopid" VALUE="<dtml-var "manager_obj.shopid">">
<INPUT TYPE="hidden" NAME="amount" VALUE="<dtml-var all_price fmt="%0.2f">">
<INPUT TYPE="hidden" NAME="cust_fax" VALUE="&dtml-loggedin_user;">
<INPUT TYPE="hidden" NAME="currency" VALUE="<dtml-var "REQUEST['cur_code']">">
<INPUT TYPE="hidden" NAME="sessionid" VALUE="<dtml-var "REQUEST['HTTP_COOKIE']">">
<TR>
<TD COLSPAN="2">
<p><dtml-gettext>You are about to submit an order to</dtml-gettext> <dtml-var "gettext(manager_obj.shop_from_name)"> <dtml-gettext>for a total amount of</dtml-gettext> <B><dtml-var expr="all_price + all_price * portal_properties.vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</B> <dtml-gettext>(incl. VAT)</dtml-gettext> /
&nbsp;<b><dtml-var expr="all_price "
fmt="%0.2f">&nbsp;&dtml-money_unit;</B> <dtml-gettext>(excl. VAT)</dtml-gettext></p>
<p><dtml-gettext>Expected day of delivery:</dtml-gettext> <B>&dtml-correct_ddate;</B></p>
<p><dtml-gettext>Before we proceed to payment options, please provide the shipping address for this order:</dtml-gettext></p>
<p />
</TD>
</TR>
<TR>
<TD><dtml-gettext>Name:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_name" VALUE="<dtml-var "REQUEST['cust_name']">"></TD>
</TR>
<TR>
<TD><dtml-gettext>Organisation:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_organisation" VALUE="<dtml-var "REQUEST['cust_organisation']">"></TD>
</TR>
<TR>
<TD><dtml-gettext>Address:</dtml-gettext></TD>
<TD><textarea NAME="cust_address"><dtml-var "REQUEST['cust_address']"></textarea></TD>
</TR>
<TR>
<TD><dtml-gettext>Zip code:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_zipcode" VALUE="<dtml-var "REQUEST['cust_zipcode']">"></TD>
</TR>
<TR>
<TD><dtml-gettext>City:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_city" VALUE="<dtml-var "REQUEST['cust_city']">"></TD>
</TR>
<TR>
<TD><dtml-gettext>Country:</dtml-gettext></TD>
<TD><select name="cust_country">
<dtml-in "portal_properties.shipping_countries">
<option value="&dtml-sequence-item;" <dtml-if "REQUEST['cust_country'] == _['sequence-item']">selected</dtml-if>><dtml-var "gettext(_['sequence-item'])"></option>
</dtml-in>
</select>
<br><font size="-2"><dtml-gettext>If your country is not listed here, it simply means we are unable to ship to your country at the present time. We deeply apologize for this inconvenience.</dtml-gettext>
</TD>
</TR>
<TR>
<TD><dtml-gettext>Phone:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_phone" VALUE="<dtml-var "REQUEST['cust_phone']">"></TD>
</TR>
<TR>
<TD><dtml-gettext>Email:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_email" VALUE="<dtml-var "REQUEST['cust_email']">"></TD>
</TR>
<TR>
<TD><dtml-gettext>VAT Number:</dtml-gettext></TD>
<TD><INPUT TYPE="text" NAME="cust_vat" VALUE="<dtml-var "REQUEST['cust_vat']">">
<br><font size="-2"><dtml-gettext>EU Companies outside France will not pay the VAT if they provide a valid EU VAT Number. Customers outside EU (company or not) will not pay the VAT at all.
</dtml-gettext>
</TD>
</TR>
<TR>
<TD COLSPAN="2" HEIGHT="4">&nbsp;</TD>
</TR>
<TR>
<TD COLSPAN="2" align="center"><INPUT TYPE="submit" VALUE=" <dtml-gettext>Proceed to payment options</dtml-gettext> "></TD>
</TR>
</FORM>
</TABLE>
</dtml-let>
\ No newline at end of file
<dtml-var standard_html_header>
<dtml-call "REQUEST.set('currency_manager', getCurrencyManager())">
<dtml-call "REQUEST.set('member_currency', getMemberObj().pref_currency)">
<TABLE BORDER="0" WIDTH="100%">
<TR>
<TD VALIGN="top" WIDTH="50%"><dtml-var checkOut></TD>
</TR>
</TABLE>
<dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header>
<dtml-call "REQUEST.set('local_currency_name', portal_currency_manager.getMemberCurrency())">
<TABLE BORDER="0" WIDTH="100%" CLASS="FormLayout">
<FORM ACTION="update_computer_product" METHOD="POST" ENCTYPE="multipart/form-data">
<TR>
<TH VALIGN="top">Navn:</TD>
<TD><INPUT TYPE="text" NAME="prod_name" VALUE="&dtml-title;">
<DL CLASS="FieldHelp">
<DD>The name of the product.</DD>i
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Short Description:</TD>
<TD><TEXTAREA NAME="description" ROWS="5" COLS="30"><dtml-var description></TEXTAREA>
<DL CLASS="FieldHelp">
<DD>The description of the product.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Long Description:</TD>
<TD><textarea name="text:text"
rows="20" cols="80"><dtml-var text></textarea>
</TD>
</TR>
<TR>
<TH VALIGN="top">Category:</TD>
<TD>
<SELECT NAME="prod_category:list" SIZE="3" MULTIPLE>
<dtml-let contentSubject=Subject
allowedSubjects="portal_metadata.listAllowedSubjects(this())">
<dtml-in allowedSubjects>
<dtml-let item=sequence-item
sel="item in contentSubject and 'selected' or ''">
<OPTION VALUE="&dtml-sequence-item;" &dtml-sel;>&dtml-sequence-item;</OPTION>
</dtml-let>
</dtml-in>
</dtml-let>
</SELECT>
<DL CLASS="FieldHelp">
<DD>You should place your procu in one - or more - category, so visitors on the site can find your product easier.
Pick the category that fits your product best.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Price:</TD>
<TD><INPUT TYPE="text" NAME="price:float" VALUE="&dtml-price;">
<DL CLASS="FieldHelp">
<DD>The price of your product (in <dtml-var "REQUEST['local_currency_name']">).</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Days to deliver:</TD>
<TD><INPUT TYPE="text" NAME="delivery_days:int" VALUE="&dtml-delivery_days;">
<DL CLASS="FieldHelp">
<DD>How many days will it take to deliver your product (as precise as possible).</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Thumbnail picture:</TD>
<TD><INPUT TYPE="file" NAME="thumbnail" VALUE=""><BR>
&dtml-thumbnail;
<DL CLASS="FieldHelp">
<DD>A little picturre of the product that can be shown in the product catalog.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Large picture:</TD>
<TD><INPUT TYPE="file" NAME="image" VALUE=""><BR>
&dtml-image;
<DL CLASS="FieldHelp">
<DD>Picture of your product that will be used at the product page.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Product Path:</TD>
<TD><INPUT TYPE="text" NAME="product_path" VALUE="<dtml-if product_path><dtml-var product_path></dtml-if>"><BR>
<DL CLASS="FieldHelp">
<DD>Product path.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Processor:</TD>
<TD>
<dtml-in "getProcessorSizes()">
<INPUT TYPE="text" NAME="procsize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="procprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getProcessorPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="procsize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="procprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of processor options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Memory:</TD>
<TD>
<dtml-in "getMemorySizes()">
<INPUT TYPE="text" NAME="memsize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="memprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getMemoryPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="memsize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="memprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of memory options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Disk:</TD>
<TD>
<dtml-in "getDiskSizes()">
<INPUT TYPE="text" NAME="disksize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="diskprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getDiskPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="disksize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="diskprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of disk options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Options:</TD>
<TD>
<dtml-in "getOptions()">
<INPUT TYPE="text" NAME="option_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="optionprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getOptionPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="option_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="optionprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of service options.</DD>
</DL>
</TD>
</TR>
<!-- test to see if NON option should be checked -->
<dtml-if "this().isCredit">
<dtml-if "this().isCredit == 1">
<dtml-call "REQUEST.set('credit_sel', '')">
<dtml-else>
<dtml-call "REQUEST.set('credit_sel', 'CHECKED')">
</dtml-if>
<dtml-else>
<dtml-call "REQUEST.set('credit_sel', 'CHECKED')">
</dtml-if>
<TR>
<TH VALIGN="top">Is this a credit product?</TD>
<TD><INPUT TYPE="radio" NAME="isCredit" VALUE="1"
<dtml-if "this().isCredit"><dtml-if "this().isCredit == 1">CHECKED</dtml-if></dtml-if>
>Yes&nbsp;
<INPUT TYPE="radio" NAME="isCredit" VALUE="0" &dtml-credit_sel;>No
<DL CLASS="FieldHelp">
<DD>If your product is a credits product, the visitors can buy minutes to be used in pay-per-view cinemas.</DD>
</DL>
</TD>
</TR>
<dtml-if "this().isCredit">
<TR>
<TH VALIGN="top">Credits amount:</TD>
<TD><INPUT TYPE="text" NAME="credits:int" VALUE="&dtml-credits;">
<DL CLASS="FieldHelp">
<DD>How many credits the users get.</DD>
</DL>
</TD>
</TR>
<dtml-else>
<INPUT TYPE="hidden" NAME="credits:int" VALUE="&dtml-credits;">
</dtml-if>
<TR>
<TD COLSPAN="2"><INPUT TYPE="submit" VALUE=" Save "></TD>
</TR>
</FORM>
</TABLE>
<dtml-var standard_html_footer>
<table width="100%"><tr>
<td valign="top">
<p><dtml-gettext>Hardware:</dtml-gettext></p>
<ul>
<li><dtml-gettext>Color:</dtml-gettext> <dtml-var "variant[0]"></li>
<li><dtml-gettext>Processor:</dtml-gettext> <dtml-var "variant[1]"></li>
<li><dtml-gettext>Memory:</dtml-gettext> <dtml-var "variant[2]"></li>
<li><dtml-gettext>Disk:</dtml-gettext> <dtml-var "variant[3]"></li>
</ul>
<p><dtml-gettext>Options:</dtml-gettext></p>
<ul>
<dtml-in "variant[4]">
<li><dtml-var "gettext(_['sequence-item'])"></li>
</dtml-in>
</ul>
</td>
<td valign="top">
<p><dtml-gettext>Setup:</dtml-gettext> <dtml-var "variant[5]"></p>
<p><dtml-gettext>Configuration URL:</dtml-gettext> <dtml-var "variant[6]"></p>
<p><dtml-gettext>Partition:</dtml-gettext></p>
<ul>
<li>/root: <dtml-var "variant[7]"></li>
<li>/boot: <dtml-var "variant[8]"></li>
<li>/usr: <dtml-var "variant[9]"></li>
<li>/home: <dtml-var "variant[10]"></li>
<li>/var: <dtml-var "variant[11]"></li>
<li>/tmp: <dtml-var "variant[12]"></li>
<li>/swap: <dtml-var "variant[13]"></li>
<li>/free: <dtml-var "variant[14]"></li></ul>
</td>
</tr></table>
<dtml-var standard_html_header>
<dtml-in "portal_catalog.searchResults(meta_type='MMM Shop Currency Manager')">
<dtml-call "REQUEST.set('currency_manager', restrictedTraverse(path))">
</dtml-in>
<dtml-if "portal_membership.isAnonymousUser()">
<dtml-call "REQUEST.set('member_currency', 'EUR')">
<dtml-else>
<dtml-let member="portal_membership.getAuthenticatedMember()">
<dtml-call "REQUEST.set('member_currency', member.pref_currency)">
</dtml-let>
</dtml-if>
<div CLASS="Desktop">
<TABLE BORDER="0" WIDTH="100%" cellspacing="3" cellpadding="3">
<TR>
<TD ALIGN="CENTER" VALIGN="top">
<dtml-var computerproduct_presentation>
</TD>
</TR>
</TABLE>
</div>
<dtml-var standard_html_footer>
<dtml-let man_obj="getShopManager()">
<dtml-if "man_obj[0] == 0">
<dtml-let portal_status_message="'No shop manager found'">
<dtml-return checkOut>
</dtml-let>
<dtml-else>
<dtml-call "REQUEST.set('manager_obj', man_obj[1])">
</dtml-if>
</dtml-let>
<dtml-let order_obj="manager_obj.createShopOrder(REQUEST)">
<dtml-call "REQUEST.RESPONSE.redirect('%s/order_confirm_form' % order_obj.local_absolute_url())">
</dtml-let>
<dtml-let show_language_selector="0" show_breadcrumb="0">
<dtml-var standard_html_header>
<h1><dtml-gettext>Custommer Registration</dtml-gettext></h1>
<table>
<tr>
<td valign="top">
<h2><dtml-gettext>New Custommers</dtml-gettext></h2>
<p><dtml-gettext>If you are a new custommer, please provide bellow your
personal information in order to let us identify you.</dtml-gettext></p>
<form method="POST" action="register_and_addToCart">
<dtml-in "('color',
'quantity','product_path','processor','memory','disk','drive','setup',
'fs','root_partition','boot_partition','usr_partition','home_partition',
'var_partition','swap_partition','tmp_partition','free_partition', 'config_url',
'support','monitoring','backup','archive','hosting','keyboard')">
<input type="hidden" name="&dtml-sequence-item;" value="<dtml-var
"REQUEST[_['sequence-item']]">">
</dtml-in>
<dtml-in "getOptionValues('Option')">
<dtml-if "REQUEST.has_key('option_%s' % _['sequence-number'])">
<input type="hidden" name="option_&dtml-sequence-number;"
value="&dtml-sequence-item">
</dtml-if>
</dtml-in>
<input type="hidden" name="last_visit:date" value="<dtml-var ZopeTime>">
<input type="hidden" name="prev_visit:date" value="<dtml-var ZopeTime>">
<table class="FormLayout">
<tr valign="top">
<th> <dtml-gettext>Login Name</dtml-gettext>
</th>
<td>
<input type="text"
name="username" size="30"
value="<dtml-if username><dtml-var username></dtml-if>">
</td>
</tr>
<tr>
<th> <dtml-gettext>Email Address</dtml-gettext>
</th>
<td align="left" valign="top">
<input type="text" name="email" size="30"
value="<dtml-if email><dtml-var email></dtml-if>">
</td>
</tr>
<dtml-unless expr="portal_properties.validate_email">
<tr>
<th> <dtml-gettext>Password</dtml-gettext>
</th>
<td align="left" valign="top">
<input type="password" name="password" size="30">
</td>
</tr>
<tr>
<th> <dtml-gettext>Password (confirm)</dtml-gettext>
</th>
<td align="left" valign="top">
<input type="password" name="confirm" size="30">
</td>
</tr>
<tr>
<th> <dtml-gettext>Mail Password?</dtml-gettext>
</th>
<td>
<input type="checkbox" name="mail_me" size="30" id="cb_mailme" />
<em><label for="cb_mailme"><dtml-gettext>Check this box to have your password
mailed to you.</dtml-gettext></label></em>
</td>
</tr>
</dtml-unless>
<dtml-comment> These items do not actually exist (yet?)
<tr>
<th> Full Name<br>(Optional)
</th>
<td>
<input type="text" name="full_name" size="30"
value="<dtml-if full_name><dtml-var full_name></dtml-if>">
</td>
</tr>
<tr>
<th> Company<br>(Optional)
</th>
<td>
<input type="text" name="company" size="30"
value="<dtml-if company><dtml-var company></dtml-if>">
</td>
</tr>
</dtml-comment>
<dtml-comment>
<dtml-in CommonProperties>
<dtml-let property_name=sequence-item
current_value="_.has_key(property_name) and _[property_name] or ''">
<tr>
<th> <dtml-var sequence-item spacify>
</th>
<td>
<input type="text" name="<dtml-var sequence-item>" size="30"
value="&dtml-current_value;">
</td>
</tr>
</dtml-let>
</dtml-in>
</dtml-comment>
</table>
<p align="center"><input type="submit" value=" <dtml-gettext>Register & Add
to Cart</dtml-gettext> "></p>
</form>
</td>
<td valign="top">
<h2><dtml-gettext>Existing Custommers</dtml-gettext></h2>
<p><dtml-gettext>If you are a registered custommer, please provide your user
login and password in order to proceed.</dtml-gettext></p>
<form method="POST" action="login_and_addToCart">
<dtml-in
"('color','processor','quantity','product_path','memory','disk','drive','setup'
,
'fs','root_partition','boot_partition','usr_partition','home_partition',
'var_partition','swap_partition','tmp_partition','free_partition', 'config_url',
'support','monitoring','backup','archive','hosting','keyboard')">
<input type="hidden" name="&dtml-sequence-item;" value="<dtml-var
"REQUEST[_['sequence-item']]">">
</dtml-in>
<dtml-in "getOptionValues('Option')">
<dtml-if "REQUEST.has_key('option_%s' % _['sequence-number'])">
<input type="hidden" name="option_&dtml-sequence-number;"
value="&dtml-sequence-item">
</dtml-if>
</dtml-in>
<table class="FormLayout">
<tr>
<td align="left" valign="top">
<strong><dtml-gettext>Name:</dtml-gettext></strong>
</td>
<td align="left" valign="top">
<input type="TEXT" name="__ac_name" size="20"
value="<dtml-var "REQUEST.get('__ac_name', '')">">
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><dtml-gettext>Password:</dtml-gettext></strong>
</td>
<td align="left" valign="top">
<input type="PASSWORD" name="__ac_password" size="20">
</td>
</tr>
</table>
<p align="center"><input type="submit" value=" <dtml-gettext>Login & Add to
Cart</dtml-gettext> "></p>
</form>
</td>
</tr>
</table>
<dtml-var standard_html_footer>
</dtml-let>
<dtml-var standard_html_header>
<p><i><dtml-gettext>Thank you for choosing Storever. All Storever products are available with a choice of
hardware, software, and service options. Please use this form to configure your.</dtml-gettext></i></p>
<dtml-if "portal_membership.isAnonymousUser()">
<form method="POST" action="custommer_registration">
<dtml-else>
<form method="POST" action="login_and_addToCart">
</dtml-if>
<dtml-comment>Keep previous choice hidden</dtml-comment>
<dtml-in "('color','quantity','product_path')">
<input type="hidden" name="&dtml-sequence-item;" value="<dtml-var "REQUEST[_['sequence-item']]">">
</dtml-in>
<table>
<tr ><td colspan="2"><h1><dtml-gettext>Hardware Options</dtml-gettext></h1></td></tr>
<tr>
<td width="25%"><dtml-gettext>Processor:</dtml-gettext></td>
<td>
<select name="processor">
<dtml-in "getProcessorValues()">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Speed increases with clock frequencies and cache memory. Celeron processors use a 256KB L1 cache. Pentium III processors use a 256 KB or a 512 KB L1 cache.
Celeron processors use a 100 Mhz FSB frequency. Pentium III processors use a 133 Mhz FSB.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Memory:</dtml-gettext></td>
<td>
<select name="memory">
<dtml-in "getMemoryValues()">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>128 MB is sufficient for a low traffic Web server or mail server.
More memory is required for highly loaded servers or for servers which need to access large databases
and require to store database indices into memory.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Disk:</dtml-gettext></td>
<td>
<select name="disk">
<dtml-in "getDiskValues()">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>10 GB is sufficient for a personal server. 80 GB disk is sufficient for most servers. Multiple hard disks are very useful in order to maximise reliability (RAID technology) or increase storage (LVM technology).</dtml-gettext></td>
</tr>
<tr>
<td valign="top"><dtml-gettext>Other:</dtml-gettext></td>
<td>
<dtml-in "getOptionValues('Option')">
<input type="checkbox" name="option_&dtml-sequence-number;" value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> (+&dtml-sequence-item; EUR)<br>
</dtml-in>
</td>
</tr>
<tr ><td colspan="2"><h1><dtml-gettext>Software Options</dtml-gettext></h1></td></tr>
<tr>
<td><dtml-gettext>Setup:</dtml-gettext></td>
<td>
<select name="setup">
<dtml-in "getOptionValues('Setup')">
<option value="&dtml-sequence-key;" <dtml-if expr="setup==_['sequence-key']">selected</dtml-if>>&dtml-sequence-key; <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Storever systems can be installed with a choice of Debian or Mandrake distribution. Please be aware that Storever
systems are sold to professional users who should be trained enough to use and configure their server by themselves. In particular, Storever
provides no kind of warranty on pre-installed GNU/Linux distributions.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Filesystem type:</dtml-gettext></td>
<td>
<select name="fs">
<dtml-in "getOptionValues('Filesystem')">
<option value="&dtml-sequence-key;">&dtml-sequence-key; <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Storever systems can be configured with a choice
or 3 filesystems: Reiser, Ext2 and Ext3. If you do not know which file system to
choose, select Ext3.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Partitions:</dtml-gettext></td>
<td>
<table>
<tr><td>/root:</td><td><input type="text" name="root_partition" /></td></tr>
<tr><td>/boot:</td><td><input type="text" name="boot_partition" /></td></tr>
<tr><td>/usr:</td><td><input type="text" name="usr_partition" /></td></tr>
<tr><td>/home:</td><td><input type="text" name="home_partition" /></td></tr>
<tr><td>/var:</td><td><input type="text" name="var_partition" /></td></tr>
<tr><td>/tmp:</td><td><input type="text" name="tmp_partition" /></td></tr>
<tr><td>/swap:</td><td><input type="text" name="swap_partition" /></td></tr>
<tr><td>/free:</td><td><input type="text" name="free_partition" /></td></tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Storever systems can be partitioned to your needs. The root
partition contains the core system including preferences, the boot partition contains the Linux kernel,
the usr partition contains most application software, the home partition
contains user files, the var partition contains log files and application
data, the tmp partition contains temporary files, the swap partition
allows to define the amount of virtual memory and the free partition is
used to define empty space on the hard disk which may eventually be used
to create more partitions.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Configuration:</dtml-gettext></td>
<td>
<input type="text" name="config_url" size="60">
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Expert users may provide a URL
to a <A HREF="http://www.systemimager.org">SystemImager</A> setup which we shall use to install their server.</dtml-gettext></td>
</tr>
<tr ><td colspan="2"><h1><dtml-gettext>Service Options</dtml-gettext></h1></td></tr>
<tr>
<td>Support:</td>
<td>
<select name="support">
<dtml-in "getOptionValues('Support')">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Storever provides a choice of levels of support.
Web community support is a free service without any warranty based user mailing lists.
It is the best option for advanced users. Other users are encouraged to subscibe
a service pack so that they can get commercial support from fully qualified engineers.
Please make sure you read the <A HREF="products/service/support">general conditions</A> of Storever support service.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Monitoring:</dtml-gettext></td>
<td>
<select name="monitoring">
<dtml-in "getOptionValues('Monitoring')">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Storever can provide you with monitoring
service in order to maximise the reliability of your server. Self monitoring
is based on webmin software and is built-in all Storever computer products.
Advanced monitoring is based on the Telemetry box.
Expert montoring includes human analysis of your log files
and analysis of intrusion detection.
Please make sure you read the <A HREF="products/service/monitoring">general conditions</A> of Storever monitoring service.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Hosting:</dtml-gettext></td>
<td>
<select name="hosting">
<dtml-in "getOptionValues('Hosting')">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>Storever servers may be hosted at the
Storever hosting center in Paris where we provide a
100 Mbps high quality connection to the Internet.
Please make sure you read the <A HREF="products/service/hosting">general conditions</A> of Storever hosting service.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Online Backup:</dtml-gettext></td>
<td>
<select name="backup">
<dtml-in "getOptionValues('Backup')">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>In order to backup your data without
pain, we propose a choice of backup options based on the rsync technology
and ssh encryption. Your data will be saved at Storever Online Backup
Center. Please make sure you read the <A HREF="products/service/backup">general conditions</A> of Storever backup service.</dtml-gettext></td>
</tr>
<tr>
<td><dtml-gettext>Offline Archive:</dtml-gettext></td>
<td>
<select name="archive">
<dtml-in "getOptionValues('Archive')">
<option value="&dtml-sequence-key;"><dtml-var "gettext(_['sequence-key'])"> <dtml-if expr="_['sequence-item'] > 0.0">(+&dtml-sequence-item; EUR)</dtml-if></option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp"><dtml-gettext>To maximise data security,
we strongly recommend to make copy of your data in a location which
can not be accessed through any kind of network connection. Storever can provide
you this kind of service based on rsync, ssh and ftp technologies.
Please make sure you read the <A HREF="products/service/hosting">general conditions</A> of Storever offline archive service.</dtml-gettext></td>
</tr>
</table>
<p align="center">
<dtml-if "portal_membership.isAnonymousUser()">
<input type="submit" name="submit" value=" <dtml-gettext>Proceed to registration</dtml-gettext> ">
<dtml-else>
<input type="submit" name="submit" value=" <dtml-gettext>Add to Cart</dtml-gettext> ">
</dtml-if>
</p>
</form>
<dtml-var standard_html_footer>
<dtml-if "'index.html' in objectIds()">
<dtml-var index.html>
<dtml-elif "'index.stx' in objectIds()">
<dtml-var index.stx>
<dtml-elif "'default.htm' in objectIds()">
<dtml-var default.htm>
<dtml-else>
<dtml-var standard_html_header>
<dtml-let folder_url=absolute_url>
<div class="Document">
<dtml-if name="Description">
<p><dtml-var TranslatedDescription></p>
</dtml-if>
<dtml-in expr="objectValues(['MMM Computer Product','Base18 Folder'])" skip_unauthorized
sort=TranslatedTitle_or_id>
<dtml-let obj="_.getitem('sequence-item', 0 )"
folderish=isPrincipiaFolderish
portalish="_.hasattr( obj, 'isPortalContent' ) and obj.isPortalContent"
getIcon="_.hasattr(obj, 'getIcon') and obj.getIcon()"
icon="getIcon or _.getattr(obj, 'icon', '')">
<dtml-if portalish>
<h1>
<dtml-if icon>
<a href="&dtml-folder_url;/&dtml.url_quote-getId;"><img
src="&dtml-portal_url;/&dtml-icon;" alt="&dtml-Type;" border="0">
</a>
</dtml-if>
<a href="&dtml-folder_url;/&dtml.url_quote-getId;"
>&dtml-TranslatedTitle_or_id;</a>
</h1>
<dtml-if name="Description">
<p>&dtml.html_quote-TranslatedDescription;</p>
</dtml-if>
</dtml-if>
</dtml-let>
</dtml-in>
</div>
</dtml-let>
<dtml-var standard_html_footer>
</dtml-if>
\ No newline at end of file
## Script (Python) "getCurrencyManager"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Uggly patch to bypass ZSQLCatalog issue
##
return context.portal_currency_manager
## Script (Python) "transformation_identity_update"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=lang
##title=
##
from ZTUtils import make_query
request = context.REQUEST
query = make_query(request.form)
# Try to get the id of the DTML method / PT / etc.
method_id = request.URL0[len(request.URL1):]
my_id = context.id
if callable(my_id): my_id = my_id()
if '/' + my_id == method_id:
method_id = ''
relative_url = context.portal_url.getRelativeUrl(context)
# Chop useless language information
for l in context.gettext.get_available_languages():
if relative_url[0:len(l) + 1] == l + '/':
relative_url = relative_url[len(l) + 1:]
# Chop useless /
if relative_url == '':
if len(method_id) > 0:
if method_id[0] == '/':
method_id = method_id[1:]
try:
affiliate_path = context.AFFILIATE_PATH
except:
affiliate_path = ''
# Build the new URL
if query == '':
return '%s/%s/%s%s%s' % (context.portal_url.getPortalObject().absolute_url(), lang,
affiliate_path,
relative_url,
method_id)
else:
return '%s/%s/%s%s%s?%s' % (context.portal_url.getPortalObject().absolute_url(), lang,
affiliate_path,
relative_url,
method_id, query)
## Script (Python) "getShopManager"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Uggly patch to bypass ZSQLCatalog issue
##
return 1, context.portal_shop_manager
## Script (Python) "getTotalPrice"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Computer Total Price
##
shopping_cart = context.getShoppingCart()
exchange_rate = context.REQUEST['exchange_rate']
cur_code = context.REQUEST['cur_code']
shopmanager = context.getShopManager()[1]
local_fee = shopmanager.send_fee_local
world_fee = shopmanager.send_fee_world
exchange_fee = shopmanager.exchange_fee
all_price = 0
for item in shopping_cart.listProducts():
product_path = item.getProduct()
quantity = item.getQuantity()
variant = item.getVariant()
product = context.restrictedTraverse(product_path)
prod_deliver_days = product.delivery_days
prod_price = product.computePrice(variant)
price = float(prod_price) / float(exchange_rate)
total_price = int(quantity) * float(price)
all_price = float(all_price) + float(total_price)
item.setDeliveryDays(prod_deliver_days)
if cur_code == shopmanager.local_currency:
send_fee = float(local_fee)
exc_fee = float(0)
else:
send_fee = float(world_fee) / float(exchange_rate)
exc_fee = float(exchange_fee) / float(exchange_rate)
all_price = float(all_price) + float(send_fee) + float(exc_fee)
return all_price
##parameters=euvat , country
# Tells if this client has to pay VAT
eu_countries = [ 'Austria', 'Belgium', 'Denmark', 'Finland', 'France', 'Germany', 'Greece', 'Ireland', 'Italy', 'Luxembourg', 'Netherlands', 'Portugal', 'Spain', 'Sweden' ,'United Kingdom']
if euvat != '' and country != 'France':
return 0
if not country in eu_countries:
return 0
return 1
\ No newline at end of file
## Script (Python) "local_absolute_url"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=lang=None,affiliate_path=None,target=None
##title=
##
if lang is None: lang = context.gettext.get_selected_language()
if target is None:
relative_url = context.portal_url.getRelativeUrl(context)
else:
relative_url = context.portal_url.getRelativeUrl(target)
try:
if affiliate_path is None:
affiliate_path = context.AFFILIATE_PATH
except:
affiliate_path = ''
return '%s/%s/%s%s' % (context.portal_url.getPortalObject().absolute_url(), lang,
affiliate_path, relative_url)
<dtml-var standard_html_header>
<p>
<dtml-if expr="portal_membership.isAnonymousUser()">
You have been logged out.
<dtml-else>
You are logged in outside the portal. You may need to
<a href="/manage_zmi_logout">log out of the Zope management interface</a>.
</dtml-if>
</p>
<dtml-var standard_html_footer>
<dtml-if portal_skins>
<dtml-if expr="portal_skins.updateSkinCookie()">
<dtml-call setupCurrentSkin>
</dtml-if>
</dtml-if>
<dtml-with portal_properties>
<dtml-if "portal_membership.isAnonymousUser()">
<dtml-var standard_html_header>
<dtml-call "REQUEST['RESPONSE'].expireCookie('__ac', path='/')">
<h1 class="DesktopTitle"><dtml-gettext>Login failure</dtml-gettext></h1>
<!-- <p><a href="&dtml.url-mail_password_form;">I forgot my password!</a></p>
-->
<p class="Desktop"><dtml-gettext>You are not currently logged in.
Your username and or password may be incorrect.
Your browser may also not be configured to accept
HTTP cookies. You may try to login again by going back to the previous page.
If you need help please contact</dtml-gettext>
<a href="mailto:&dtml-email_from_address;">&dtml-email_from_address;</a>.
</p>
<dtml-var standard_html_footer>
<dtml-else>
<dtml-let member="portal_membership.getAuthenticatedMember()">
<dtml-if "member.login_time == _.DateTime('2000/01/01') and
validate_email">
<dtml-comment>
First login by this user. Display message and offer password changer form.
Init login times to now
</dtml-comment>
<dtml-call
"member.setProperties(last_login_time=ZopeTime(),
login_time=ZopeTime())">
<dtml-else>
<dtml-call
"member.setProperties(last_login_time=member.login_time)">
<dtml-call "member.setProperties(login_time=ZopeTime())">
</dtml-if>
<dtml-call "REQUEST.set('options',())">
<dtml-in "getOptionValues('Option')">
<dtml-if "REQUEST.has_key('option_%s' % _['sequence-number'])">
<dtml-call "REQUEST.set('options',REQUEST.get('options')+
(_['sequence-key'],))">
</dtml-if>
</dtml-in>
<dtml-call "REQUEST.set('variant', (color,processor,memory,disk,
options + (support,hosting,monitoring,backup,archive,drive,keyboard,fs),setup,
config_url,
root_partition,
boot_partition,usr_partition,home_partition,var_partition,tmp_partition,
swap_partition,free_partition))">
</dtml-let>
</dtml-if>
</dtml-with>
<dtml-var "addToCart(REQUEST,REQUEST.get('variant'))">
<dtml-var standard_html_header>
<h1 class="DesktopTitle">
<dtml-gettext>Log in</dtml-gettext>
</h1>
<p><dtml-gettext>The action you have requested requires to provide your custommer information bellow.</dtml-gettext></p>
<form action="&dtml-secure_absolute_url;/logged_in" method="post">
<!-- ****** Enable the automatic redirect ***** -->
<dtml-if name="came_from">
<input type="hidden" name="came_from" value="&dtml-came_from;">
</dtml-if>
<!-- ****** Enable the automatic redirect ***** -->
<table class="FormLayout">
<tr>
<td align="left" valign="top">
<strong><dtml-gettext>Name</dtml-gettext></strong>
</td>
<td align="left" valign="top">
<input type="TEXT" name="__ac_name" size="20"
value="<dtml-var "REQUEST.get('__ac_name', '')">">
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><dtml-gettext>Password</dtml-gettext></strong>
</td>
<td align="left" valign="top">
<input type="PASSWORD" name="__ac_password" size="20">
</td>
</tr>
<tr valign="top" align="left">
<td></td>
<td><input type="checkbox" name="__ac_persistent" value="1" checked
id="cb_remember" />
<label for="cb_remember">Remember my name.</label>
</td></tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<input type="submit" name="submit" value=" Login ">
</td>
</tr>
</table>
</form>
<p><a href="&dtml.url-mail_password_form;">I forgot my password!</a></p>
<p>
<dtml-gettext>Having trouble logging in? Make sure to enable cookies in your web browser.</dtml-gettext>
</p>
<p><dtml-gettext>Don't forget to logout or exit your browser when you're done.</dtml-gettext>
</p>
<p>
<dtml-gettext>Setting the 'Remember my name' option will set a cookie with your username,
so that when you next log in, your user name will already be filled in for you.</dtml-gettext>
</p>
<dtml-var standard_html_footer>
REQUEST=context.REQUEST
try:
return context.portal_registration.mailPassword(REQUEST['userid'], REQUEST)
except 'NotFound', error:
message = error
except 'ValueError', error:
message = error
redirect_url = '%s/mail_password_form?portal_status_message=%s' % ( context.absolute_url()
, message
)
REQUEST.RESPONSE.redirect( redirect_url )
\ No newline at end of file
<dtml-if AFFILIATE_PATH>
<dtml-let news_list="portal_catalog.searchResults( meta_type=['News Item','Base18 News Item']
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
, Subject = AFFILIATE_PATH
)">
<dtml-if news_list>
<table class="NewsItems" cellspacing="0" cellpadding="0" border="0" width="150">
<tr>
<td class="NewsBorder" width="1" rowspan="13" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="2" border="0">
</td>
<td valign="top" class="NewsTitle" width="150">
<b><dtml-gettext>News</dtml-gettext></b>
</td>
</tr>
<dtml-in news_list size="10">
<tr class="NewsItemRow">
<td valign="top" class="title">
<p><a href="<dtml-var "local_absolute_url(lang=gettext.get_selected_language(),
target=getObject() )">">
<dtml-var "getObject().TranslatedTitle()"> </a></p>
<p class="description"><dtml-var Date> - <dtml-var "getObject().TranslatedDescription()"></p>
</td>
</tr>
<dtml-else>
<tr class="NewsItemRow">
<td valign="top" class="title">
<dtml-gettext>No news is no news.</dtml-gettext>
</td>
</tr>
</dtml-in>
<tr class="NewsItemRow" >
<td class="title">
<a href="&dtml-local_absolute_url;/recent_news"><dtml-gettext>More...</dtml-gettext></a>
</td>
</tr>
</table>
</dtml-if>
</dtml-let>
<dtml-else>
<dtml-let news_list="portal_catalog.searchResults( meta_type=['News Item','Base18 News Item']
, sort_on='Date'
, sort_order='reverse'
, review_state='published'
)">
<dtml-if news_list>
<table class="NewsItems" cellspacing="0" cellpadding="0" border="0" width="150">
<tr>
<td class="NewsBorder" width="1" rowspan="13" bgcolor="#6699CC">
<img src="spacer.gif" alt=" "
width="1" height="2" border="0">
</td>
<td valign="top" class="NewsTitle" width="150">
<b><dtml-gettext>News</dtml-gettext></b>
</td>
</tr>
<dtml-in news_list size="10">
<tr class="NewsItemRow">
<td valign="top" class="title">
<p><a href="<dtml-var "local_absolute_url(lang=gettext.get_selected_language(),
target=getObject())">">
<dtml-var "getObject().TranslatedTitle()"> </a></p>
<p class="description"><dtml-var Date> - <dtml-var "getObject().TranslatedDescription()"></p>
</td>
</tr>
<dtml-else>
<tr class="NewsItemRow">
<td valign="top" class="title">
<dtml-gettext>No news is no news.</dtml-gettext>
</td>
</tr>
</dtml-in>
<tr class="NewsItemRow" >
<td class="title">
<a href="&dtml-local_absolute_url;/recent_news"><dtml-gettext>More...</dtml-gettext></a>
</td>
</tr>
</table>
</dtml-if>
</dtml-let>
</dtml-if>
\ No newline at end of file
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Accept Request for Repair</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to request a repair on an order. Use the
form bellow to provide a detailed description of the incident. Do not
send anything before you get our acceptance.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="accept">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Accept RMA</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Authorize Order</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to authorize orders built by partners
before they are shipped. If you have any comments, plese you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="authorize">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Authorize Order</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Build Order</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to build an order. Built orders
can be shipped. If you have any comments, plese you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="build">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Build Order</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Cancel an Order</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to cancel an order. Cancelled orders
can not be confirmed anylonger. If you have any comments, plese you the
text area bellow</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="cancel">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Cancel Order</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<div class="Desktop">
<p><dtml-gettext>Thank you very much for submitting an order. In order to confirm your
order, please select a payment option with the form bellow. If you are not certain yet,
you may still access this order later by selecting the menu <b>My Orders</b> and confirm payment options.
You may also</dtml-gettext> <a href="./order_cancel_form"><dtml-gettext>cancel this order by clicking here</dtml-gettext></a>.
</p>
<h1><dtml-gettext>Order Summary</dtml-gettext></h1>
<dtml-var shoporder_box>
<dtml-let code_societe="'nexedi'"
montantvat="getTotalPriceVAT()"
montant="getTotalPrice()"
payvat="has_vat(euvat = getEUVat(), country = getCountry() )"
>
<h1><dtml-gettext>Payment Optionsaa</dtml-gettext></h1>
<p><dtml-gettext>Storever Online accepts payments by money transfer or by credit carda</dtml-gettext></p>
<h3><dtml-gettext>Online Paymenta</dtml-gettext></h3>
<p><dtml-gettext>With our secure online payment system operated by CIC, you can simply use you credit card to pay</dtml-gettext> <b><dtml-if payvat><dtml-var montantvat><dtml-else><dtml-var montant></dtml-if> EUR</b>
<dtml-gettext> online with the same or better level of security as in the real world.</dtml-gettext></p>
<center>
<dtml-let code_societe="'nexedi'"
texte_bouton="gettext('Secure Online Payment')"
langue="gettext.get_selected_language()"
TPE="'/etc/cmmac/6496547.key'"
url_banque="'https://ssl.paiement.cic-banques.fr/paiement.cgi'"
texte_libre="_.string.join(getPhysicalPath()[1:],'/')"
reference="id"
url_retour_err="secure_absolute_url() + '?portal_status_message=' + gettext('Online+Payment+Rejected')"
url_retour_ok="secure_absolute_url() + '?portal_status_message=' + gettext('Online+Payment+Accepted') ">
<dtml-if payvat>
<dtml-var "payment.CreerFormulaireCM(url_retour_err=url_retour_err,url_retour_ok=url_retour_ok,texte_libre=texte_libre,reference=reference,code_societe=code_societe,texte_bouton=texte_bouton, langue=langue, TPE=TPE, url_banque=url_banque,montant=montantvat)">
<dtml-else>
<dtml-var "payment.CreerFormulaireCM(url_retour_err=url_retour_err,url_retour_ok=url_retour_ok,texte_libre=texte_libre,reference=reference,code_societe=code_societe,texte_bouton=texte_bouton, langue=langue, TPE=TPE, url_banque=url_banque,montant=montant)">
</dtml-if>
</dtml-let>
</center>
<dtml-comment>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="confirm">
<input type="hidden" name="comment" value="Confirm payment online">
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Order and Pay Online</dtml-gettext>"></p>
</form>
</dtml-comment>
<h3><dtml-gettext>Money Transfera</dtml-gettext></h3>
<p><dtml-gettext>If you prefer not to use your credit card online, please send</dtml-gettext> <b><dtml-if payvat><dtml-var montantvat><dtml-else><dtml-var montant></dtml-if> EUR</b> <dtml-gettext>to Nexedi SARL bank account</dtml-gettext></p>
<p align="center">IBAN: FR76 3002 7000 3900 0000 1332 336</p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="confirm">
<input type="hidden" name="comment" value="Confirm payment by money transfer">
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Order and Pay by Money Transfera</dtml-gettext>"></p>
</form>
</dtml-let>
</div>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Order Information</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to provide information to customers.
Please use the text area bellow to provide the information you
want your customer to receive.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="inform">
<strong><em>Order information:</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Order Information</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Confirm Invoice</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to confirm that an invoice was sent to the
customer. Please you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="invoice">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Invoice</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-if "portal_membership.isAnonymousUser()">
<dtml-call "REQUEST.RESPONSE.redirect('login_form?came_from=order_list')">
<dtml-else>
<dtml-call "REQUEST.RESPONSE.redirect('%s/ShoppingCart/show_orders' %
secure_absolute_url(target=portal_membership.getHomeFolder()) )">
</dtml-if>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Confirm Partial Shipment</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to confirm partial shipment for an order. Shipped orders
can eventually be sent back. If you have any comments, please you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="partial_ship">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Partial Shipment</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Confirm Payment for an Order</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to confirm payment an order. Paid orders
can be built. If you have any comments, plese you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="pay">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Payment</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Confirm Reception</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to request a repair on an order. Use the
form bellow to provide a detailed description of the incident. Do not
send anything before you get our acceptance.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="receive">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Reception</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Reject an Order</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to reject an order. Rejected orders
can not be confirmed anylonger. If you have any comments, plese you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="reject">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Reject Order</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Reject Request for Repair</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to request a repair on an order. Use the
form bellow to provide a detailed description of the incident. Do not
send anything before you get our acceptance.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="reject_rma">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Reject RMA</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Repair Order</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to request a repair on an order. Use the
form bellow to provide a detailed description of the incident. Do not
send anything before you get our acceptance.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="repair">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Repair Order</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Request Repair</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to request a repair on an order. Use the
form bellow to provide a detailed description of the incident. Do not
send anything before you get our acceptance.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="request_rma">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Request Repair</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-let member="portal_membership.getAuthenticatedMember()"
review_state="portal_workflow.getInfoFor(this(), 'order_state')"
review_history="portal_workflow.getInfoFor(this(), 'order_history')">
<div class="Desktop">
<h1><dtml-gettext>Confirm Shipment</dtml-gettext></h1>
<p><dtml-gettext>This form allows you to confirm shipment for an order. Shipped orders
can eventually be sent back. If you have any comments, plese you the
text area bellow.</dtml-gettext></p>
<form method="post" action="<dtml-if order_obj><dtml-var "order_obj.secure_absolute_url()"></dtml-if>order_status_modify">
<input type="hidden" name="workflow_action" value="ship">
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
<p align="center"><input type="submit" value="<dtml-gettext>Confirm Shipment</dtml-gettext>"></p>
</form>
<dtml-if review_history>
<p><strong>Reviewing history</strong><br>
<dtml-in review_history mapping reverse>
<dtml-var time fmt="aCommon"> &dtml-action;
<dtml-if effective_date>
(effective: <dtml-var effective_date fmt="aCommon">)
</dtml-if>
by &dtml-actor;<br>
<dtml-if "_['sequence-item']['comments']">
</p><dtml-var "_['sequence-item']['comments']" fmt="structured-text"><p>
</dtml-if>
</dtml-in>
</p>
</dtml-if>
</div>
</dtml-let>
<dtml-var standard_html_footer>
## Script (Python) "order_status_modify"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=workflow_action, comment=''
##title=Modify the status of an order object
##
context.portal_workflow.doActionFor(
context,
workflow_action,
comment=comment)
if workflow_action == 'reject':
redirect_url = context.portal_url() + '/search?review_state=pending'
elif workflow_action == 'confirm':
# Empty the cart first
try:
user = context.portal_membership.getAuthenticatedMember().getUserName()
mem_folder = context.portal_membership.getHomeFolder(user)
mem_folder.ShoppingCart.clearCart()
except:
pass
redirect_url = '%s/view?%s' % ( context.local_absolute_url()
, 'portal_status_message=Order+confirmed.'
)
elif workflow_action == 'cancel':
redirect_url = '%s/view?%s' % ( context.local_absolute_url()
, 'portal_status_message=Order+cancelled.'
)
else:
redirect_url = '%s/view?%s' % ( context.local_absolute_url()
, 'portal_status_message=Status+changed.'
)
context.REQUEST[ 'RESPONSE' ].redirect( redirect_url )
## Script (Python) "register_and_addToCart"
##bind container=container
##bind context=context
##bind namespace=_
##bind script=script
##bind subpath=traverse_subpath
##parameters=password='password', confirm='confirm', product_path
##title=Register a user
##
from ZTUtils import make_query
REQUEST=context.REQUEST
portal_properties = context.portal_properties
portal_registration = context.portal_registration
portal_membership = context.portal_membership
if not portal_registration.isMemberIdAllowed(REQUEST['username']):
failMessage = 'Bad name. Login names must only contain letters (without accents) and numbers. Please choose another login name.'
if len(portal_membership.searchMembers('id', REQUEST['username'])) > 0:
failMessage = 'Sorry, this login name already exists. Please choose another login name.'
REQUEST.set( 'portal_status_message', failMessage )
return context.custommer_registration(context, REQUEST)
if not portal_properties.validate_email:
failMessage = portal_registration.testPasswordValidity(password, confirm)
if failMessage:
REQUEST.set( 'portal_status_message', failMessage )
return context.custommer_registration(context, REQUEST)
failMessage = portal_registration.testPropertiesValidity(REQUEST)
if failMessage:
REQUEST.set( 'portal_status_message', failMessage )
return context.custommer_registration(context, REQUEST)
else:
REQUEST.set('pref_currency','EUR')
password=REQUEST.get('password') or portal_registration.generatePassword()
portal_registration.addMember(REQUEST['username'], password, properties=REQUEST)
if portal_properties.validate_email or REQUEST.get('mail_me', 0):
portal_registration.registeredNotify(REQUEST['username'])
REQUEST.set('__ac_name',REQUEST['username'])
REQUEST.set('__ac_password',password)
#context.cookie_authentication.modifyRequest(REQUEST, None)
return context.registered_before_addToCart(context, REQUEST)
<dtml-let show_language_selector="0" show_breadcrumb="0">
<dtml-var standard_html_header>
<h1><dtml-gettext>Congratulations: you have been registered</dtml-gettext></h1>
<p><dtml-gettext>You are now a registered custommer. Please read the sales
terms and conditions and add this item to your shopping
cart.</dtml-gettext></p>
<dtml-with "legal.sales">
<table BGCOLOR="#C0C0C0" cellpadding="10" align="center" width="80%"><tr><td
bgcolor="#C0C0C0">
<center><p><dtml-var TranslatedTitle></p></center>
<dtml-var TranslatedBody>
</td></tr></table>
</dtml-with>
<form method="POST" action="<dtml-var "secure_absolute_url()">/login_and_addToCart">
<dtml-in
"('color','processor','quantity','product_path','memory','disk','drive','setup'
,
'fs','root_partition','boot_partition','usr_partition','home_partition',
'var_partition','swap_partition','tmp_partition','free_partition', 'config_url',
'support','monitoring','backup','archive','hosting','keyboard')">
<input type="hidden" name="&dtml-sequence-item;" value="<dtml-var
"REQUEST[_['sequence-item']]">">
</dtml-in>
<dtml-in "getOptionValues('Option')">
<dtml-if "REQUEST.has_key('option_%s' % _['sequence-number'])">
<input type="hidden" name="option_&dtml-sequence-number;"
value="&dtml-sequence-item">
</dtml-if>
</dtml-in>
<dtml-if variation_category_list>
<dtml-in "variation_category_list">
<input type="hidden" name="variation_category_list:list"
value="&dtml-sequence-item;"/>
</dtml-in>
</dtml-if>
<input type="hidden" name="__ac_name" size="20"
value="<dtml-var "REQUEST.get('__ac_name', '')">">
<input type="hidden" name="__ac_password" value="<dtml-var
"REQUEST.get('__ac_password', '')">" size="20">
<p align="center"><input type="submit" value=" <dtml-gettext>Accept and Add
to Cart</dtml-gettext> "></p>
</form>
<dtml-var standard_html_footer>
</dtml-let>
<table width="100%"><tr>
<td valign="top">
<p>Hardware:</p>
<ul>
<li>Color: <span tal:replace="python:options.variant"/></li>
<li>Processor: <span /></li>
<li>Memory: <span /></li>
<li>Disk: <span /></li>
</ul>
<p>Options:</p>
<ul>
<li tal:repeat="item python:options.variant" tal:content="item">Options</li>
</ul>
</td>
<td valign="top">
<p>Setup: <span /></p>
<p>Configuration URL: <span /></p>
<p>Partition:</p>
<ul>
<li>/root: <span /></li>
<li>/boot: <span /></li>
<li>/usr: <span /></li>
<li>/home: <span /></li>
<li>/var: <span /></li>
<li>/tmp: <span /></li>
<li>/swap: <span /></li>
<li>/free: <span /></li></ul>
</td>
</tr></table>
\ No newline at end of file
<dtml-var standard_html_header>
<div class="Desktop">
<h1> Search Results </h1>
<dtml-let results="doFormSearch( REQUEST=REQUEST )">
<p>Found <dtml-var expr="_.len(results)" thousands_commas>
items.</p>
<dtml-in results sort="id" size="25" start="batch_start">
<dtml-let objURL="getURL() + '/view'">
<dtml-if sequence-start>
<table class="SearchResults">
<tr>
<td width="16"><br></td>
<th> Title
</th>
<th> Type
</th>
<th> Date
</th>
</tr>
</dtml-if>
<tr>
<td>
<dtml-if getIcon>
<a href="&dtml-objURL;"><img
src="&dtml-portal_url;/&dtml-getIcon;" border="0"
alt="[&dtml.missing-Type;]"
title="[&dtml.missing-Type;]"></a>
</dtml-if>
</td>
<td>
<a href="&dtml-objURL;"><dtml-if name="Title"><dtml-var name="Title" size="75" html_quote><dtml-else>(No title)</dtml-if></a>
</td>
<td>
&dtml.missing-Type;
</td>
<td>
&dtml-Date;
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="3"><em>
<dtml-if name="Description"><dtml-var name="Description"
missing="(No description)" size="200" html_quote>
<dtml-else>(No description)</dtml-if></em></td>
</tr>
<dtml-if sequence-end>
</table>
</dtml-if>
</dtml-let>
<dtml-else>
<p> There are no items matching your specified criteria. </p>
</dtml-in>
<dtml-in results size="25" start="batch_start" next>
<dtml-let url=URL
sqry=sequence-query
next=next-sequence-start-number
nextSize=next-sequence-size
nextURL="'%s%sbatch_start=%s' % (url,sqry,next)"
>
<p> <a href="&dtml-nextURL;"> Next &dtml-nextSize; items </a> </p>
</dtml-let>
</dtml-in>
</dtml-let>
</div>
<dtml-var standard_html_footer>
## Script (Python) "secure_absolute_url"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=lang=None,affiliate_path=None,target=None
##title=
##
if lang is None: lang = context.gettext.get_selected_language()
if target is None:
relative_url = context.portal_url.getRelativeUrl(context)
else:
relative_url = context.portal_url.getRelativeUrl(target)
try:
if affiliate_path is None:
affiliate_path = context.AFFILIATE_PATH
except:
affiliate_path = ''
return '%s%s/%s%s' % (context.secure_url, lang,
affiliate_path, relative_url)
## Script (Python) "secure_redirect"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
from ZTUtils import make_query
request = context.REQUEST
if context.portal_membership.isAnonymousUser():
form_method = 'custommer_registration'
else:
form_method = 'login_and_addToCart'
request.RESPONSE.redirect( '%s/%s?%s' % (context.secure_absolute_url(), form_method, make_query(request.form)) )
<dtml-var standard_html_header>
<dtml-call "REQUEST.set('local_currency_name', getLocalCurrencyName())">
<TABLE BORDER="0" WIDTH="100%" CLASS="FormLayout">
<FORM ACTION="update_computer_product" METHOD="POST" ENCTYPE="multipart/form-data">
<TR>
<TH VALIGN="top">Navn:</TD>
<TD><INPUT TYPE="text" NAME="prod_name" VALUE="&dtml-title;">
<DL CLASS="FieldHelp">
<DD>The name of the product.</DD>i
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Short Description:</TD>
<TD><TEXTAREA NAME="description" ROWS="5" COLS="30">&dtml-description;</TEXTAREA>
<DL CLASS="FieldHelp">
<DD>The description of the product.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Long Description:</TD>
<TD><textarea name="text:text"
rows="20" cols="80"><dtml-var text html_quote></textarea>
</TD>
</TR>
<TR>
<TH VALIGN="top">Category:</TD>
<TD>
<SELECT NAME="prod_category:list" SIZE="3" MULTIPLE>
<dtml-let contentSubject=Subject
allowedSubjects="portal_metadata.listAllowedSubjects(this())">
<dtml-in allowedSubjects>
<dtml-let item=sequence-item
sel="item in contentSubject and 'selected' or ''">
<OPTION VALUE="&dtml-sequence-item;" &dtml-sel;>&dtml-sequence-item;</OPTION>
</dtml-let>
</dtml-in>
</dtml-let>
</SELECT>
<DL CLASS="FieldHelp">
<DD>You should place your procu in one - or more - category, so visitors on the site can find your product easier.
Pick the category that fits your product best.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Price:</TD>
<TD><INPUT TYPE="text" NAME="price:float" VALUE="&dtml-price;">
<DL CLASS="FieldHelp">
<DD>The price of your product (in <dtml-var "REQUEST['local_currency_name']">).</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Days to deliver:</TD>
<TD><INPUT TYPE="text" NAME="delivery_days:int" VALUE="&dtml-delivery_days;">
<DL CLASS="FieldHelp">
<DD>How many days will it take to deliver your product (as precise as possible).</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Thumbnail picture:</TD>
<TD><INPUT TYPE="file" NAME="thumbnail" VALUE=""><BR>
&dtml-thumbnail;
<DL CLASS="FieldHelp">
<DD>A little picturre of the product that can be shown in the product catalog.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Large picture:</TD>
<TD><INPUT TYPE="file" NAME="image" VALUE=""><BR>
&dtml-image;
<DL CLASS="FieldHelp">
<DD>Picture of your product that will be used at the product page.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Processor:</TD>
<TD>
<dtml-in "getProcessorSizes()">
<INPUT TYPE="text" NAME="procsize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="procprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getProcessorPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="procsize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="procprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of processor options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Memory:</TD>
<TD>
<dtml-in "getMemorySizes()">
<INPUT TYPE="text" NAME="memsize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="memprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getMemoryPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="memsize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="memprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of memory options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Disk:</TD>
<TD>
<dtml-in "getDiskSizes()">
<INPUT TYPE="text" NAME="disksize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="diskprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getDiskPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="disksize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="diskprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of disk options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Options:</TD>
<TD>
<dtml-in "getOptions()">
<INPUT TYPE="text" NAME="option_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="optionprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getOptionPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="option_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="optionprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of service options.</DD>
</DL>
</TD>
</TR>
<!-- test to see if NON option should be checked -->
<dtml-if "this().isCredit">
<dtml-if "this().isCredit == 1">
<dtml-call "REQUEST.set('credit_sel', '')">
<dtml-else>
<dtml-call "REQUEST.set('credit_sel', 'CHECKED')">
</dtml-if>
<dtml-else>
<dtml-call "REQUEST.set('credit_sel', 'CHECKED')">
</dtml-if>
<TR>
<TH VALIGN="top">Is this a credit product?</TD>
<TD><INPUT TYPE="radio" NAME="isCredit" VALUE="1"
<dtml-if "this().isCredit"><dtml-if "this().isCredit == 1">CHECKED</dtml-if></dtml-if>
>Yes&nbsp;
<INPUT TYPE="radio" NAME="isCredit" VALUE="0" &dtml-credit_sel;>No
<DL CLASS="FieldHelp">
<DD>If your product is a credits product, the visitors can buy minutes to be used in pay-per-view cinemas.</DD>
</DL>
</TD>
</TR>
<dtml-if "this().isCredit">
<TR>
<TH VALIGN="top">Credits amount:</TD>
<TD><INPUT TYPE="text" NAME="credits:int" VALUE="&dtml-credits;">
<DL CLASS="FieldHelp">
<DD>How many credits the users get.</DD>
</DL>
</TD>
</TR>
<dtml-else>
<INPUT TYPE="hidden" NAME="credits:int" VALUE="&dtml-credits;">
</dtml-if>
<TR>
<TD COLSPAN="2"><INPUT TYPE="submit" VALUE=" Save "></TD>
</TR>
</FORM>
</TABLE>
<dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header>
<dtml-in "portal_catalog.searchResults(meta_type='MMM Shop Currency Manager')">
<dtml-let path="portal_catalog.getpath(data_record_id_)">
<dtml-call "REQUEST.set('currency_manager', restrictedTraverse(path))">
</dtml-let>
</dtml-in>
<dtml-if "portal_membership.isAnonymousUser()">
<dtml-call "REQUEST.set('member_currency', 'EUR')">
<dtml-else>
<dtml-let member="portal_membership.getAuthenticatedMember()">
<dtml-call "REQUEST.set('member_currency', member.pref_currency)">
</dtml-let>
</dtml-if>
<div CLASS="Desktop">
<TABLE BORDER="0" WIDTH="100%" cellspacing="3" cellpadding="3">
<TR>
<TD ALIGN="LEFT" VALIGN="top" width="400">
<dtml-var computerproduct_presentation>
</TD>
</TR>
</TABLE>
</div>
<dtml-var standard_html_footer>
\ No newline at end of file
## Script (Python) "setCurrencyParams"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Set the currency parameters for a specific member
##
currency_manager = context.getCurrencyManager()
#member_currency = context.portal_memberdata.getMemberDataContents().pref_currency
member_currency = 1
for currency in currency_manager.listCurrencies():
if currency.getCode() == member_currency:
context.REQUEST.set('exchange_rate', currency.getRate())
context.REQUEST.set('money_unit', currency.getMonetaryUnit())
context.REQUEST.set('prod_unit', currency.getMonetaryUnit())
context.REQUEST.set('cur_code', currency.getCode())
## Script(Python) "setPersonalDetailsParams"
##parameters=
##title=Set the personal details params for use in the checkout page
shopping_cart = context.getShoppingCart()
pdetails = shopping_cart.getPersonalDetails()
context.REQUEST.set('cust_name', pdetails[0])
context.REQUEST.set('cust_address', pdetails[1])
context.REQUEST.set('cust_zipcode', pdetails[2])
context.REQUEST.set('cust_city', pdetails[3])
context.REQUEST.set('cust_country', pdetails[4])
context.REQUEST.set('cust_phone', pdetails[5])
context.REQUEST.set('cust_email', pdetails[6])
context.REQUEST.set('cust_vat', '')
context.REQUEST.set('cust_organisation', pdetails[7])
<dtml-if display_in_payment>
<dtml-else>
<dtml-var printable_html_header>
</dtml-if>
<dtml-call "setCurrencyParams()">
<dtml-call "REQUEST.set('shopmanager', getShopManager()[1])">
<div class="Desktop">
<TABLE BORDER="0" WIDTH="100%">
<TR Class="NewsTitle">
<TD colspan="4" Class="NewsTitle"><dtml-gettext>My Order</dtml-gettext></TD>
</TR>
<dtml-if disp_msg>
<TR>
<TD colspan="4">&dtml-disp_msg;</TD>
</TR>
<dtml-else>
<dtml-call "REQUEST.set('prod_update_url', REQUEST['URL'] + '?display_orderitem=true&itemobj=')">
<TR>
<TD width="97%" nowrap><B><dtml-gettext>Product</dtml-gettext></B></TD>
<TD width="1%" nowrap><B><dtml-gettext>Quantity</dtml-gettext></B>&nbsp;</TD>
<TD width="1%" nowrap><B><dtml-gettext>Price / Piece</dtml-gettext></B>&nbsp;</TD>
<TD width="1%" nowrap><B><dtml-gettext>Total</dtml-gettext></B></TD>
</TR>
<dtml-call "REQUEST.set('all_price', 0)">
<dtml-in "listProducts()">
<dtml-let item="_.getitem('sequence-item')"
item_id=sequence-index
product="item.getProduct()"
quantity="item.getQuantity()"
variant="item.getVariant()"
prod_obj="restrictedTraverse(product)"
prod_price="item.getPrice()"
prod_variant_line="prod_obj.shortVariant(variant)"
price="_.float(prod_price) / _.float(REQUEST['exchange_rate'])"
total_price="_.int(quantity) * _.float(price)">
<TR>
<TD width="97%" nowrap><A HREF="&dtml-prod_update_url;&dtml-item_id;"><dtml-var "prod_obj.title"></A> <font size="-2"><dtml-var "prod_variant_line"></font></TD>
<TD width="1%" nowrap align="center">&dtml-quantity;</TD>
<TD width="1%" nowrap align="right">&dtml-money_unit; <dtml-var price fmt="%0.2f">&nbsp;&nbsp;</TD>
<TD width="1%" nowrap align="right">&dtml-money_unit; <dtml-var total_price fmt="%0.2f"></TD>
</TR>
</dtml-let>
</dtml-in>
<dtml-call "REQUEST.set('all_price', getTotalPrice())">
<dtml-if "_.float(all_price) == 0">
<TR>
<TD COLSPAN="4"><dtml-gettext>You have no items in this order</dtml-gettext></TD>
</TR>
<dtml-else>
<TR>
<TD><dtml-gettext>Sending fee:</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var send_fee fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<dtml-if "exchange_fee == 0">
<dtml-else>
<TR>
<TD><dtml-gettext>Exchange fee:</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var exchange_fee fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
</dtml-if>
<TR>
<TD COLSPAN="4"><HR></TD>
</TR>
<TR>
<TD><b><dtml-gettext>Total amount (excl. VAT):</dtml-gettext></b></TD>
<TD COLSPAN="3" ALIGN="right"><b><dtml-var all_price fmt="%0.2f">&nbsp;&dtml-money_unit;</b></TD>
</TR>
<TR>
<TD><dtml-gettext>VAT (<dtml-var expr="vat * 100.0" fmt="%0.2f">%) (for EU citizens and French companies only):</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var expr="all_price * vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<TR>
<TD><dtml-gettext><b>Total amount (incl. VAT):</b></dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><b><dtml-var expr="all_price + all_price * vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</b></TD>
</TR>
</dtml-if>
</dtml-if>
<TR>
<TD colspan="4"></TD>
</TR>
</TABLE>
<h3><dtml-gettext>Custommer Information</dtml-gettext></h3>
<table>
<TR>
<TD><B><dtml-gettext>Name:</dtml-gettext></b></TD>
<TD><dtml-var name></TD>
</TR>
<TR>
<TD><B><dtml-gettext>Organisation:</dtml-gettext></b></TD>
<TD><dtml-var organisation></TD>
</TR>
<TR>
<TD><B><dtml-gettext>Address:</dtml-gettext></B></TD>
<TD><dtml-var address></TD>
</TR>
<TR>
<TD><B><dtml-gettext>Zip code:</dtml-gettext></B></TD>
<TD><dtml-var zipcode></TD>
</TR>
<TR>
<TD><B><dtml-gettext>City:</dtml-gettext></B></TD>
<TD>&dtml-city;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>Country:</dtml-gettext></B></TD>
<TD>&dtml-country;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>Telephone:</dtml-gettext></B></TD>
<TD>&dtml-phone;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>Email:</dtml-gettext></B></TD>
<TD>&dtml-email;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>EU VAT No:</dtml-gettext></B></TD>
<TD>&dtml-euvat;</TD>
</TR>
</table>
<dtml-if display_in_payment>
<dtml-else>
<dtml-let actions="portal_actions.listFilteredActionsFor(this())"
object_actions="actions['workflow']" >
<dtml-let review_state="portal_workflow.getInfoFor(this(), 'order_state', '')">
<dtml-if review_state>
<h3><dtml-gettext>Order Status:</dtml-gettext> <dtml-var "gettext(review_state)"></h3>
<p>
<dtml-gettext>Available Order Actions:</dtml-gettext> <dtml-in object_actions mapping>
<a href="&dtml-url;"><dtml-var "gettext(name)"></a>&nbsp;
<dtml-else><dtml-gettext>None</dtml-gettext></dtml-in> </i></p>
</dtml-if>
</dtml-let>
</dtml-let>
</dtml-if>
<dtml-if "REQUEST.has_key('display_orderitem')">
<TABLE BORDER="0" WIDTH="100%">
<dtml-if "REQUEST.has_key('itemobj')">
<dtml-let order_obj="getProduct(_.int(REQUEST['itemobj']))"
product="order_obj.getProduct()"
quantity="order_obj.getQuantity()"
variant="order_obj.getVariant()"
prod_obj="restrictedTraverse(product)"
prod_name="prod_obj.title"
prod_desc="prod_obj.description"
prod_image="prod_obj.image"
prod_price="order_obj.getPrice()"
price="_.float(prod_price) / _.float(REQUEST['exchange_rate'])"
total_price="_.int(quantity) * _.float(price)">
<TR>
<TD><h2><dtml-gettext>Details of Order Item:</dtml-gettext> &dtml-prod_name;</h2></TD><TD rowspan="5">
<dtml-if "not prod_image == ''"><IMG SRC="&dtml-prod_image;" BORDER="0"></dtml-if></TD>
</TR>
<TR>
<TD><I>&dtml-prod_desc;</I></TD>
</TR>
<TR>
<TD><dtml-gettext>Unit Price for this congiguration:</dtml-gettext> &dtml-prod_unit; <dtml-var price fmt="%0.2f"></TD>
</TR>
<TR>
<TD><dtml-gettext>Quantity:</dtml-gettext> &dtml-quantity;</TD>
</TR>
<TR>
<TD><dtml-gettext>Total price:</dtml-gettext> &dtml-prod_unit; <dtml-var total_price fmt="%0.2f"></TD>
</TR>
<TR>
<TD colspan="2">
<h2><dtml-gettext>Configuration options</dtml-gettext></h2>
<dtml-with prod_obj><dtml-var computerproduct_variant></dtml-with></TD>
</TR>
</dtml-let>
</dtml-if>
</TABLE>
</dtml-if>
</div>
<dtml-if display_in_payment>
<dtml-else>
<dtml-var printable_html_footer>
</dtml-if>
<dtml-if display_in_payment>
<dtml-else>
<dtml-var standard_html_header>
</dtml-if>
<dtml-call "setCurrencyParams()">
<dtml-call "REQUEST.set('shopmanager', getShopManager()[1])">
<div class="Desktop">
<TABLE BORDER="0" WIDTH="100%">
<TR Class="NewsTitle">
<TD colspan="4" Class="NewsTitle"><dtml-gettext>My Order</dtml-gettext></TD>
</TR>
<dtml-if disp_msg>
<TR>
<TD colspan="4">&dtml-disp_msg;</TD>
</TR>
<dtml-else>
<dtml-call "REQUEST.set('prod_update_url', REQUEST['URL'] + '?display_orderitem=true&itemobj=')">
<TR>
<TD width="97%" nowrap><B><dtml-gettext>Product</dtml-gettext></B></TD>
<TD width="1%" nowrap><B><dtml-gettext>Quantity</dtml-gettext></B>&nbsp;</TD>
<TD width="1%" nowrap><B><dtml-gettext>Price / Piece</dtml-gettext></B>&nbsp;</TD>
<TD width="1%" nowrap><B><dtml-gettext>Total</dtml-gettext></B></TD>
</TR>
<dtml-call "REQUEST.set('all_price', 0)">
<dtml-in "listProducts()">
<dtml-let item="_.getitem('sequence-item')"
item_id=sequence-index
product="item.getProduct()"
quantity="item.getQuantity()"
variant="item.getVariant()"
prod_obj="restrictedTraverse(product)"
prod_price="item.getPrice()"
prod_variant_line="prod_obj.shortVariant(variant)"
price="_.float(prod_price) / _.float(REQUEST['exchange_rate'])"
total_price="_.int(quantity) * _.float(price)">
<TR>
<TD width="97%" nowrap><A HREF="&dtml-prod_update_url;&dtml-item_id;"><dtml-var "prod_obj.title"></A> <font size="-2"><dtml-var "prod_variant_line"></font></TD>
<TD width="1%" nowrap align="center">&dtml-quantity;</TD>
<TD width="1%" nowrap align="right">&dtml-money_unit; <dtml-var price fmt="%0.2f">&nbsp;&nbsp;</TD>
<TD width="1%" nowrap align="right">&dtml-money_unit; <dtml-var total_price fmt="%0.2f"></TD>
</TR>
</dtml-let>
</dtml-in>
<dtml-call "REQUEST.set('all_price', getTotalPrice())">
<dtml-if "_.float(all_price) == 0">
<TR>
<TD COLSPAN="4"><dtml-gettext>You have no items in this order</dtml-gettext></TD>
</TR>
<dtml-else>
<TR>
<TD><dtml-gettext>Sending fee:</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var send_fee fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<dtml-if "exchange_fee == 0">
<dtml-else>
<TR>
<TD><dtml-gettext>Exchange fee:</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var exchange_fee fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
</dtml-if>
<TR>
<TD COLSPAN="4"><HR></TD>
</TR>
<TR>
<TD><b><dtml-gettext>Total amount (excl. VAT):</dtml-gettext></b></TD>
<TD COLSPAN="3" ALIGN="right"><b><dtml-var all_price fmt="%0.2f">&nbsp;&dtml-money_unit;</b></TD>
</TR>
<TR>
<TD><dtml-gettext>VAT (<dtml-var expr="vat * 100.0" fmt="%0.2f">%) (for EU citizens and French companies only):</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var expr="all_price * vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<TR>
<TD><dtml-gettext><b>Total amount (incl. VAT):</b></dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><b><dtml-var expr="all_price + all_price * vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</b></TD>
</TR>
</dtml-if>
</dtml-if>
<TR>
<TD colspan="4"></TD>
</TR>
</TABLE>
<h3><dtml-gettext>Custommer Information</dtml-gettext></h3>
<table>
<TR>
<TD><B><dtml-gettext>Name:</dtml-gettext></b></TD>
<TD><dtml-var name></TD>
</TR>
<TR>
<TR>
<TD><B><dtml-gettext>Organisation:</dtml-gettext></b></TD>
<TD><dtml-var organisation></TD>
</TR>
<TR>
<TD><B><dtml-gettext>Address:</dtml-gettext></B></TD>
<TD><dtml-var address></TD>
</TR>
<TR>
<TD><B><dtml-gettext>Zip code:</dtml-gettext></B></TD>
<TD><dtml-var zipcode></TD>
</TR>
<TR>
<TD><B><dtml-gettext>City:</dtml-gettext></B></TD>
<TD>&dtml-city;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>Country:</dtml-gettext></B></TD>
<TD>&dtml-country;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>Telephone:</dtml-gettext></B></TD>
<TD>&dtml-phone;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>Email:</dtml-gettext></B></TD>
<TD>&dtml-email;</TD>
</TR>
<TR>
<TD><B><dtml-gettext>EU VAT No:</dtml-gettext></B></TD>
<TD>&dtml-euvat;</TD>
</TR>
</table>
<dtml-if display_in_payment>
<dtml-else>
<dtml-let actions="portal_actions.listFilteredActionsFor(this())"
object_actions="actions['workflow']" >
<dtml-let review_state="portal_workflow.getInfoFor(this(), 'order_state', '')">
<dtml-if review_state>
<h3><dtml-gettext>Order Status:</dtml-gettext> <dtml-var "gettext(review_state)"></h3>
<p>
<dtml-gettext>Available Order Actions:</dtml-gettext> <dtml-in object_actions mapping>
<a href="&dtml-url;"><dtml-var "gettext(name)"></a>&nbsp;
<dtml-else><dtml-gettext>None</dtml-gettext></dtml-in> </i></p>
</dtml-if>
</dtml-let>
</dtml-let>
</dtml-if>
<dtml-if "REQUEST.has_key('display_orderitem')">
<TABLE BORDER="0" WIDTH="100%">
<dtml-if "REQUEST.has_key('itemobj')">
<dtml-let order_obj="getProduct(_.int(REQUEST['itemobj']))"
product="order_obj.getProduct()"
quantity="order_obj.getQuantity()"
variant="order_obj.getVariant()"
prod_obj="restrictedTraverse(product)"
prod_name="prod_obj.title"
prod_desc="prod_obj.description"
prod_image="prod_obj.image"
prod_price="order_obj.getPrice()"
price="_.float(prod_price) / _.float(REQUEST['exchange_rate'])"
total_price="_.int(quantity) * _.float(price)">
<TR>
<TD><h2><dtml-gettext>Details of Order Item:</dtml-gettext> &dtml-prod_name;</h2></TD><TD rowspan="5">
<dtml-if "not prod_image == ''"><IMG SRC="&dtml-prod_image;" BORDER="0"></dtml-if></TD>
</TR>
<TR>
<TD><I>&dtml-prod_desc;</I></TD>
</TR>
<TR>
<TD><dtml-gettext>Unit Price for this congiguration:</dtml-gettext> &dtml-prod_unit; <dtml-var price fmt="%0.2f"></TD>
</TR>
<TR>
<TD><dtml-gettext>Quantity:</dtml-gettext> &dtml-quantity;</TD>
</TR>
<TR>
<TD><dtml-gettext>Total price:</dtml-gettext> &dtml-prod_unit; <dtml-var total_price fmt="%0.2f"></TD>
</TR>
<TR>
<TD colspan="2">
<h2><dtml-gettext>Configuration options</dtml-gettext></h2>
<dtml-with prod_obj><dtml-var computerproduct_variant></dtml-with></TD>
</TR>
</dtml-let>
</dtml-if>
</TABLE>
</dtml-if>
</div>
<dtml-if display_in_payment>
<dtml-else>
<dtml-var standard_html_footer>
</dtml-if>
<dtml-if "portal_membership.isAnonymousUser()">
<dtml-call "REQUEST.RESPONSE.redirect('login_form?came_from=order_list')">
<dtml-else>
<dtml-call "REQUEST.RESPONSE.redirect('%s/ShoppingCart/view' %
secure_absolute_url(target=portal_membership.getHomeFolder()) )">
</dtml-if>
<dtml-let lang="gettext.get_selected_language()">
<dtml-if display_in_product>
<dtml-else>
<dtml-var standard_html_header>
<dtml-call "REQUEST.set('currency_manager', getCurrencyManager())">
<dtml-call "REQUEST.set('member_currency', getMemberObj().pref_currency)">
</dtml-if>
<dtml-call "setCurrencyParams()">
<dtml-call "REQUEST.set('shopmanager', getShopManager()[1])">
<dtml-let user="portal_membership.getAuthenticatedMember().getUserName()"
mem_folder="portal_membership.getHomeFolder(user)">
<dtml-in "mem_folder.objectValues('MMM Shop Shopping Cart')">
<dtml-let cartid="getId()">
<dtml-call "REQUEST.set('cartobj', restrictedTraverse(cartid))">
</dtml-let>
<dtml-else>
<dtml-call "REQUEST.set('disp_msg', 'You have no items in the cart')">
</dtml-in>
<dtml-in "mem_folder.objectValues('MMM Shop Order')">
<dtml-else>
<dtml-call "REQUEST.set('order_msg', 'You have no orders yet')">
</dtml-in>
</dtml-let>
<div class="Desktop">
<TABLE BORDER="0" WIDTH="100%">
<TR Class="NewsTitle">
<TD colspan="4" Class="NewsTitle"><dtml-gettext>My Shopping Cart</dtml-gettext></TD>
</TR>
<dtml-if disp_msg>
<TR>
<TD colspan="4"><dtml "gettext(disp_msg)"></TD>
</TR>
</dtml-if>
<dtml-call "REQUEST.set('prod_update_url', REQUEST['URL'] + '?display_cartitem=true&itemobj=')">
<FORM ACTION="<dtml-var "cartobj.local_absolute_url()">/update_cart">
<TR>
<TD width="97%" nowrap><B><dtml-gettext>Product</dtml-gettext></B></TD>
<TD width="1%" nowrap><B><dtml-gettext>Quantity</dtml-gettext></B>&nbsp;</TD>
<TD width="1%" nowrap><B><dtml-gettext>Price / Piece</dtml-gettext></B>&nbsp;</TD>
<TD width="1%" nowrap><B><dtml-gettext>Total</dtml-gettext></B></TD>
</TR>
<dtml-call "REQUEST.set('all_price', 0)">
<dtml-in "cartobj.listProducts()">
<dtml-let item="_.getitem('sequence-item')"
item_id=sequence-index
product="item.getProduct()"
quantity="item.getQuantity()"
variant="item.getVariant()"
prod_obj="restrictedTraverse(product)"
prod_price="prod_obj.computePrice(variant)"
prod_variant_line="prod_obj.shortVariant(variant)"
price="_.float(prod_price) / _.float(REQUEST['exchange_rate'])"
total_price="_.int(quantity) * _.float(price)">
<TR>
<TD width="97%" nowrap>
<dtml-if display_in_product>
<dtml-var "prod_obj.title">
<dtml-else>
<A HREF="&dtml-prod_update_url;&dtml-item_id;"><dtml-var "prod_obj.title"></A>
</dtml-if>
&nbsp;<font size="-2"><dtml-var "prod_variant_line"></font></TD>
<TD width="1%" nowrap align="center">
<dtml-if display_in_product>
&dtml-quantity;
<dtml-else>
<A HREF="&dtml-prod_update_url;&dtml-item_id;">&dtml-quantity;</A>
</dtml-if>
</TD>
<TD width="1%" nowrap align="right"><dtml-var price fmt="%0.2f">&nbsp;&dtml-money_unit;&nbsp;</TD>
<TD width="1%" nowrap align="right"><dtml-var total_price fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
</dtml-let>
</dtml-in>
<dtml-call "REQUEST.set('all_price', getTotalPrice())">
<dtml-if "_.float(all_price) == 0">
<TR>
<TD COLSPAN="4"><dtml-gettext>You have no items in you shopping cart</dtml-gettext></TD>
</TR>
<dtml-else>
<dtml-if "REQUEST['cur_code'] == shopmanager.local_currency">
<dtml-call "REQUEST.set('send_fee', _.float(shopmanager.send_fee_local))">
<dtml-call "REQUEST.set('exchange_fee', 0)">
<dtml-else>
<dtml-let new_send_fee="_.float(shopmanager.send_fee_world) / _.float(REQUEST['exchange_rate'])"
new_exchange_fee="_.float(shopmanager.exchange_fee) / _.float(REQUEST['exchange_rate'])">
<dtml-call "REQUEST.set('send_fee', new_send_fee)">
<dtml-call "REQUEST.set('exchange_fee', new_exchange_fee)">
</dtml-let>
</dtml-if>
<TR>
<TD><dtml-gettext>Sending fee:</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var send_fee fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<dtml-if "REQUEST['exchange_fee'] == 0">
<dtml-else>
<TR>
<TD><dtml-gettext>Exchange fee:</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var exchange_fee fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
</dtml-if>
<TR>
<TD COLSPAN="4"><HR></TD>
</TR>
<TR>
<TD><dtml-gettext>Total amount to pay (excl. VAT):</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var all_price fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<TR>
<TD><dtml-gettext>VAT (<dtml-var expr="portal_properties.vat * 100.0" fmt="%0.2f">%):</dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><dtml-var expr="all_price * portal_properties.vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</TD>
</TR>
<TR>
<TD><dtml-gettext><b>Total amount to pay (incl. VAT):</b></dtml-gettext></TD>
<TD COLSPAN="3" ALIGN="right"><b><dtml-var expr="all_price + all_price * portal_properties.vat" fmt="%0.2f">&nbsp;&dtml-money_unit;</b></TD>
</TR>
<TR>
<TD HEIGHT="5" COLSPAN="4">&nbsp;</TD>
</TR>
<dtml-if display_in_product>
<dtml-else>
<TR>
<TD COLSPAN="4" align="right">
<INPUT TYPE="submit" NAME="emptyCart" VALUE=" <dtml-gettext>Empty the cart</dtml-gettext> ">
<INPUT TYPE="submit" NAME="checkOut" VALUE=" <dtml-gettext>Check out</dtml-gettext> ">
</TD>
</TR>
</dtml-if
</dtml-if>
</FORM>
</dtml-if>
<TR>
<TD colspan="3"></TD>
</TR>
</TABLE>
<dtml-if "REQUEST.has_key('display_cartitem')">
<TABLE BORDER="0" WIDTH="100%">
<FORM ACTION="<dtml-var "cartobj.local_absolute_url()">/update_cartitem">
<dtml-if "REQUEST.has_key('itemobj')">
<dtml-let cart_obj="cartobj.getProduct(_.int(REQUEST['itemobj']))"
product="cart_obj.getProduct()"
quantity="cart_obj.getQuantity()"
variant="cart_obj.getVariant()"
prod_obj="restrictedTraverse(product)"
prod_name="prod_obj.title"
prod_desc="prod_obj.description"
prod_image="prod_obj.image"
prod_price="prod_obj.computePrice(variant)"
price="_.float(prod_price) / _.float(REQUEST['exchange_rate'])"
total_price="_.int(quantity) * _.float(price)">
<dtml-if "not prod_image == ''">
</dtml-if>
<TR>
<TD><h2>&dtml-prod_name;</h2></TD><TD rowspan="6"><IMG SRC="&dtml-prod_image;" BORDER="0"></TD>
</TR>
<TR>
<TD><I>&dtml-prod_desc;</I></TD>
</TR>
<TR>
<TD><dtml-gettext>Unit Price for this configuration:</dtml-gettext> &dtml-prod_unit; <dtml-var price fmt="%0.2f"></TD>
</TR>
<TR>
<TD><dtml-gettext>Quantity:</dtml-gettext><INPUT TYPE="text" NAME="new_quantity" VALUE="&dtml-quantity;"></TD>
</TR>
<TR>
<TD><dtml-gettext>Total price:</dtml-gettext> &dtml-prod_unit; <dtml-var total_price fmt="%0.2f"></TD>
</TR>
<TR>
<INPUT TYPE="hidden" NAME="item_cartid" VALUE="&dtml-itemobj;">
<INPUT TYPE="hidden" NAME="came_from_url" VALUE="<dtml-var "REQUEST['URL']">">
<TD align="center"><INPUT TYPE="submit" NAME="delItem" VALUE=" <dtml-gettext>Delete item from cart</dtml-gettext> ">&nbsp;
<INPUT TYPE="submit" NAME="updateItem" VALUE=" <dtml-gettext>Update quantity</dtml-gettext> "></TD>
</TR>
<TR>
<TD colspan="2">
<h2><dtml-gettext>Your configuration options</dtml-gettext></h2>
<dtml-with prod_obj><dtml-var computerproduct_variant></dtml-with></TD>
</TR>
</dtml-let>
</dtml-if>
<TR>
<TD>
</FORM>
</TABLE>
</dtml-if>
</div>
<dtml-if display_in_product>
<dtml-else>
<dtml-var standard_html_footer>
</dtml-if>
</dtml-let>
\ No newline at end of file
<dtml-var standard_html_header>
<dtml-call "REQUEST.set('local_currency_name', getLocalCurrencyName())">
<TABLE BORDER="0" WIDTH="100%" CLASS="FormLayout">
<FORM ACTION="update_computer_product" METHOD="POST" ENCTYPE="multipart/form-data">
<TR>
<TH VALIGN="top">Navn:</TD>
<TD><INPUT TYPE="text" NAME="prod_name" VALUE="&dtml-title;">
<DL CLASS="FieldHelp">
<DD>The name of the product.</DD>i
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Short Description:</TD>
<TD><TEXTAREA NAME="description" ROWS="5" COLS="30">&dtml-description;</TEXTAREA>
<DL CLASS="FieldHelp">
<DD>The description of the product.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Long Description:</TD>
<TD><textarea name="text:text"
rows="20" cols="80"><dtml-var text html_quote></textarea>
</TD>
</TR>
<TR>
<TH VALIGN="top">Category:</TD>
<TD>
<SELECT NAME="prod_category:list" SIZE="3" MULTIPLE>
<dtml-let contentSubject=Subject
allowedSubjects="portal_metadata.listAllowedSubjects(this())">
<dtml-in allowedSubjects>
<dtml-let item=sequence-item
sel="item in contentSubject and 'selected' or ''">
<OPTION VALUE="&dtml-sequence-item;" &dtml-sel;>&dtml-sequence-item;</OPTION>
</dtml-let>
</dtml-in>
</dtml-let>
</SELECT>
<DL CLASS="FieldHelp">
<DD>You should place your procu in one - or more - category, so visitors on the site can find your product easier.
Pick the category that fits your product best.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Price:</TD>
<TD><INPUT TYPE="text" NAME="price:float" VALUE="&dtml-price;">
<DL CLASS="FieldHelp">
<DD>The price of your product (in <dtml-var "REQUEST['local_currency_name']">).</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Days to deliver:</TD>
<TD><INPUT TYPE="text" NAME="delivery_days:int" VALUE="&dtml-delivery_days;">
<DL CLASS="FieldHelp">
<DD>How many days will it take to deliver your product (as precise as possible).</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Thumbnail picture:</TD>
<TD><INPUT TYPE="file" NAME="thumbnail" VALUE=""><BR>
&dtml-thumbnail;
<DL CLASS="FieldHelp">
<DD>A little picturre of the product that can be shown in the product catalog.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Large picture:</TD>
<TD><INPUT TYPE="file" NAME="image" VALUE=""><BR>
&dtml-image;
<DL CLASS="FieldHelp">
<DD>Picture of your product that will be used at the product page.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Product Path:</TD>
<TD><INPUT TYPE="text" NAME="product_path" VALUE="<dtml-if product_path><dtml-var product_path></dtml-if>"><BR>
<DL CLASS="FieldHelp">
<DD>Product path.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Processor:</TD>
<TD>
<dtml-in "getProcessorSizes()">
<INPUT TYPE="text" NAME="procsize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="procprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getProcessorPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="procsize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="procprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of processor options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Memory:</TD>
<TD>
<dtml-in "getMemorySizes()">
<INPUT TYPE="text" NAME="memsize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="memprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getMemoryPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="memsize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="memprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of memory options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Disk:</TD>
<TD>
<dtml-in "getDiskSizes()">
<INPUT TYPE="text" NAME="disksize_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="diskprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getDiskPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="disksize_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="diskprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of disk options.</DD>
</DL>
</TD>
</TR>
<TR>
<TH VALIGN="top">Options:</TD>
<TD>
<dtml-in "getOptions()">
<INPUT TYPE="text" NAME="option_&dtml-sequence-number;" VALUE="&dtml-sequence-item;">&nbsp;
<INPUT TYPE="text" NAME="optionprice_&dtml-sequence-number;:float" VALUE="<dtml-var "getOptionPrice(_['sequence-item'])">"><br>
</dtml-in>
<INPUT TYPE="text" NAME="option_new" VALUE="">&nbsp;
<INPUT TYPE="text" NAME="optionprice_new:float" VALUE="0.0">
<DL CLASS="FieldHelp">
<DD>The price of service options.</DD>
</DL>
</TD>
</TR>
<!-- test to see if NON option should be checked -->
<dtml-if "this().isCredit">
<dtml-if "this().isCredit == 1">
<dtml-call "REQUEST.set('credit_sel', '')">
<dtml-else>
<dtml-call "REQUEST.set('credit_sel', 'CHECKED')">
</dtml-if>
<dtml-else>
<dtml-call "REQUEST.set('credit_sel', 'CHECKED')">
</dtml-if>
<TR>
<TH VALIGN="top">Is this a credit product?</TD>
<TD><INPUT TYPE="radio" NAME="isCredit" VALUE="1"
<dtml-if "this().isCredit"><dtml-if "this().isCredit == 1">CHECKED</dtml-if></dtml-if>
>Yes&nbsp;
<INPUT TYPE="radio" NAME="isCredit" VALUE="0" &dtml-credit_sel;>No
<DL CLASS="FieldHelp">
<DD>If your product is a credits product, the visitors can buy minutes to be used in pay-per-view cinemas.</DD>
</DL>
</TD>
</TR>
<TR>
<TD COLSPAN="2"><INPUT TYPE="submit" VALUE=" Save "></TD>
</TR>
</FORM>
</TABLE>
<dtml-var standard_html_footer>
<dtml-let lang="gettext.get_selected_language()">
<a class="topbanner" href="<dtml-var portal_url>/&dtml-lang;"><dtml-gettext>Products</dtml-gettext></a>&nbsp;|&nbsp;
<dtml-if "not portal_membership.isAnonymousUser()">
<a class="topbanner" href="&dtml-secure_url;/&dtml-lang;/shoppingcart"><dtml-gettext>My Cart</dtml-gettext></a>&nbsp;|&nbsp;
</dtml-if>
<a class="topbanner" href="&dtml-secure_url;/&dtml-lang;/order_list"><dtml-gettext>My Orders</dtml-gettext></a>
<dtml-if "not portal_membership.isAnonymousUser()">
&nbsp;|&nbsp;<a class="topbanner" href="&dtml-secure_url;/&dtml-lang;/logout"><dtml-gettext>Logout</dtml-gettext></a>
</dtml-if>
</dtml-let>
<div class="Desktop">
<dtml-if localFooter>
<dtml-var localFooter>
</dtml-if>
</div>
</td>
</tr>
</tbody>
</table>
<!-- Legalese -->
<div class="legalinfo">
<p><dtml-var "gettext(legal_footer)"></p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<dtml-comment>
Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
</dtml-comment>
<dtml-if "_.hasattr(this(),'isEffective') and not isEffective( ZopeTime() )">
<dtml-unless "portal_membership.checkPermission('Request review',this())
or portal_membership.checkPermission('Review portal
content',this())">
<dtml-var "RESPONSE.unauthorized()">
</dtml-unless>
</dtml-if>
<html>
<head>
<title><dtml-with portal_properties>&dtml-title;</dtml-with
><dtml-if name="Title">: &dtml-TranslatedTitle;</dtml-if></title>
<dtml-var css_inline_or_link>
<dtml-if relative_to_content>
<base href="&dtml-absolute_url;" />
</dtml-if>
<dtml-if HTML_CHARSET>
<meta http-equiv="Content-Type"
content="<dtml-var HTML_CHARSET>" />
<dtml-if "HTML_CHARSET == 'text/html; charset=utf-8'">
<dtml-call "REQUEST.RESPONSE.setHeader('Content-Type','text/html; charset=utf-8')">
</dtml-if>
<dtml-else>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
</dtml-if>
</head>
<dtml-with stylesheet_properties>
<body font="&dtml-base_font_color;">
</dtml-with>
<!-- Top Bar: Global links and search -->
<dtml-var standard_top_bar>
<!-- Main Page -->
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<!-- Logo -->
<dtml-let lang="gettext.get_selected_language()">
<td colspan="2" rowspan="2" class="LogoBox" valign="top">
<div class="LogoBox">
<dtml-if mdk><img src="http://new.mandrakestore.com/images/MDKSTORE.jpg">
<dtml-else>
<dtml-if AFFILIATE_PATH>
<a href="&dtml-portal_url;/&dtml-lang;/&dtml-AFFILIATE_PATH;">
<img src="&dtml-portal_url;/&dtml-lang;/&dtml-AFFILIATE_PATH;logo.png"
border="0" /></a>
<dtml-else>
<a href="&dtml-portal_url;/&dtml-lang;/">
<img src="&dtml-portal_url;/&dtml-lang;/logo.png"
border="0" /></a>
</dtml-if>
</dtml-if>
</div>
</td>
</dtml-let>
<!-- Title and Language -->
<td width="90%" class="TitleBox">
<dtml-var TranslatedTitle_or_id>
</td>
</tr>
<tr class="LanguageBox">
<td class="LanguageBox">
<dtml-if show_language_selector><dtml-var language_selector></dtml-if>
</td>
</tr>
<tr>
<dtml-if show_menu>
<td valign="top" width="150">
<!-- Optional Action Box-->
<dtml-if "not portal_membership.isAnonymousUser()">
<div class="ActionBox"><dtml-var actions_box></div>
</dtml-if>
<!-- Main menu -->
<dtml-var menu_box>
<!-- Quick Login -->
<dtml-if show_quicklogin><br><dtml-var quick_login></dtml-if>
</td>
<!-- Main Box -->
<td colspan="2" valign="top" class="Desktop">
<dtml-else>
<dtml-if
"portal_membership.getAuthenticatedMember().has_role('Partner') or
portal_membership.getAuthenticatedMember().has_role('Manager')">
<td valign="top" width="150">
<!-- Optional Action Box-->
<div class="ActionBox"><dtml-var actions_box></div>
</td>
<!-- Main Box -->
<td colspan="2" valign="top" class="Desktop">
<dtml-else>
<!-- Main Box -->
<td colspan="3" valign="top" class="Desktop">
</dtml-if>
</dtml-if>
<!-- Main Box -->
<div class="Desktop">
<dtml-if "not portal_membership.isAnonymousUser() and
not _.hasattr(portal_membership.getAuthenticatedMember(),
'getMemberId')">
<div class="AuthWarning">
<table>
<tr class="Host">
<td> Warning! </td>
<tr>
<td> You are presently logged in as a user from outside
this portal. Many parts of the portal will not work!
You may have to shut down and relaunch your browser to
log out, depending on how you originally logged in.
</td>
</tr>
</table>
</div>
</dtml-if>
</div>
<dtml-if show_breadcrumb>
<!-- Breadcrumb -->
<div class="breadcrumb">
<p><dtml-var breadcrumb></p>
</div>
</dtml-if>
<div class="Desktop">
<dtml-if portal_status_message>
<p class="DesktopStatusBar"><dtml-var
"gettext(portal_status_message)"></p>
</dtml-if>
<dtml-if localHeader>
<dtml-var localHeader>
</dtml-if>
</div>
## Script(Python) "update_cart"
##parameters=REQUEST=None
##title=Update the shopping cart
if context.meta_type == 'MMM Shop Shopping Cart':
if REQUEST.has_key('emptyCart'):
context.clearCart()
status_msg = 'The+cart+is+empty !'
return_page = 'cart'
elif REQUEST.has_key('checkOut'):
status_msg = 'BLA'
return_page = 'checkout'
else:
status_msg = 'No+action+selected'
return_page = 'cart'
else:
status_msg = 'Update+script+called+in+the+wrong+context'
return_page = 'cart'
if return_page == 'cart':
context.REQUEST.RESPONSE.redirect(context.local_absolute_url() + '/shoppingcart_view?portal_status_message=' + status_msg)
else:
context.REQUEST.RESPONSE.redirect(context.local_absolute_url() + '/checkoutPage')
## Script (Python) "update_computer_product"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=REQUEST=None
##title=Update a Computer Product
##
if context.meta_type == 'MMM Computer Product' or context.meta_type == 'Storever Computer Product':
context.editProduct(title=REQUEST['prod_name']
, description=REQUEST['description']
, price=REQUEST['price']
, isCredit=REQUEST['isCredit']
, credits = REQUEST['credits']
, category=REQUEST['prod_category']
, delivery_days=REQUEST['delivery_days']
, product_path = REQUEST['product_path']
, text= REQUEST['text'])
# Update Processor
l = len(context.getProcessorSizes())
for i in context.getProcessorSizes():
context.deleteProcessorPrice(i)
for i in range(1,l+1):
if REQUEST['procsize_%s' % i] != '':
context.setProcessorPrice(str(REQUEST['procsize_%s' % i]),float(REQUEST['procprice_%s' % i]))
if REQUEST['procsize_new'] != '':
context.setProcessorPrice(str(REQUEST['procsize_new']),float(REQUEST['procprice_new']))
# Update Memory
l = len(context.getMemorySizes())
for i in context.getMemorySizes():
context.deleteMemoryPrice(i)
for i in range(1,l+1):
if REQUEST['memsize_%s' % i] != '':
context.setMemoryPrice(str(REQUEST['memsize_%s' % i]),float(REQUEST['memprice_%s' % i]))
if REQUEST['memsize_new'] != '':
context.setMemoryPrice(str(REQUEST['memsize_new']),float(REQUEST['memprice_new']))
# Update Disk
l = len(context.getDiskSizes())
for i in context.getDiskSizes():
context.deleteDiskPrice(i)
for i in range(1,l+1):
if REQUEST['disksize_%s' % i] != '':
context.setDiskPrice(str(REQUEST['disksize_%s' % i]),float(REQUEST['diskprice_%s' % i]))
if REQUEST['disksize_new'] != '':
context.setDiskPrice(str(REQUEST['disksize_new']),float(REQUEST['diskprice_new']))
# Update Options
l = len(context.getOptions())
for i in context.getOptions():
context.deleteOptionPrice(i)
for i in range(1,l+1):
if REQUEST['option_%s' % i] != '':
context.setOptionPrice(str(REQUEST['option_%s' % i]),float(REQUEST['optionprice_%s' % i]))
if REQUEST['option_new'] != '':
context.setOptionPrice(str(REQUEST['option_new']),float(REQUEST['optionprice_new']))
# Update standard product fields
status_msg = 'Product+updated'
if REQUEST['thumbnail'] != '':
t_id = context.id + '_thumbnail'
memberfolder = context.portal_membership.getHomeFolder()
t_obj = None
for item in memberfolder.objectValues(('Portal Image','Base18 Image')):
if item.getId() == t_id:
t_obj = memberfolder.restrictedTraverse(item.getId())
if t_obj is None:
memberfolder.invokeFactory(id=t_id, type_name='Image')
t_obj = memberfolder.restrictedTraverse(t_id)
t_obj.edit(precondition='', file=REQUEST['thumbnail'])
context.editThumbnail(t_obj.absolute_url(relative=1))
status_msg = status_msg + ',+Thumbnail+updated'
if REQUEST['image'] != '':
i_id = context.id + '_image'
member_folder = context.portal_membership.getHomeFolder()
i_obj = None
for item in member_folder.objectValues(('Portal Image','Base18 Image')):
if item.getId() == i_id:
i_obj = member_folder.restrictedTraverse(item.getId())
if i_obj is None:
member_folder.invokeFactory(id=i_id, type_name='Image')
i_obj = member_folder.restrictedTraverse(i_id)
i_obj.edit(precondition='', file=REQUEST['image'])
context.editImage(i_obj.absolute_url(relative=1))
status_msg = status_msg + ',+Large+image+updated'
else:
status_msg = 'Update+script+called+in+wrong+context'
context.REQUEST.RESPONSE.redirect(context.local_absolute_url() + '/computerproduct_edit_form?portal_status_message=' + status_msg)
## Script (Python) "update_computer_product"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=REQUEST=None
##title=Update a Computer Product
##
if context.meta_type == 'Storever Simple Product':
context.editProduct(title=REQUEST['prod_name']
, description=REQUEST['description']
, price=REQUEST['price']
, isCredit=REQUEST['isCredit']
, category=REQUEST['prod_category']
, delivery_days=REQUEST['delivery_days']
, product_path = REQUEST['product_path']
, text= REQUEST['text'])
# Update Options
l = len(context.getOptions())
for i in context.getOptions():
context.deleteOptionPrice(i)
for i in range(1,l+1):
if REQUEST['option_%s' % i] != '':
context.setOptionPrice(str(REQUEST['option_%s' % i]),float(REQUEST['optionprice_%s' % i]))
if REQUEST['option_new'] != '':
context.setOptionPrice(str(REQUEST['option_new']),float(REQUEST['optionprice_new']))
# Update standard product fields
status_msg = 'Product+updated'
if REQUEST['thumbnail'] != '':
t_id = context.id + '_thumbnail'
user_obj = context.getMemberObj()
username = user_obj.getUserName()
memberfolder = context.portal_membership.getHomeFolder(username)
t_obj = None
for item in memberfolder.objectValues(('Portal Image','Base18 Image')):
if item.getId() == t_id:
t_obj = memberfolder.restrictedTraverse(item.getId())
if t_obj is None:
memberfolder.invokeFactory(id=t_id, type_name='Image')
t_obj = memberfolder.restrictedTraverse(t_id)
t_obj.edit(precondition='', file=REQUEST['thumbnail'])
context.editThumbnail(t_obj.absolute_url(relative=1))
status_msg = status_msg + ',+Thumbnail+updated'
if REQUEST['image'] != '':
i_id = context.id + '_image'
user_obj = context.getMemberObj()
username = user_obj.getUserName()
member_folder = context.portal_membership.getHomeFolder(username)
i_obj = None
for item in member_folder.objectValues(('Portal Image','Base18 Image')):
if item.getId() == i_id:
i_obj = member_folder.restrictedTraverse(item.getId())
if i_obj is None:
member_folder.invokeFactory(id=i_id, type_name='Image')
i_obj = member_folder.restrictedTraverse(i_id)
i_obj.edit(precondition='', file=REQUEST['image'])
context.editImage(i_obj.absolute_url(relative=1))
status_msg = status_msg + ',+Large+image+updated'
else:
status_msg = 'Update+script+called+in+wrong+context'
context.REQUEST.RESPONSE.redirect(context.absolute_url() + '/simpleproduct_edit_form?portal_status_message=' + status_msg)
<html metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main"
tal:define="shopmanager here/portal_shop_manager;
currencymanager here/portal_currency_manager;
payment_method python:shopmanager.getPaymentMethod(here.getLastUsedPaymentid());
paymentstruct payment_method/getPaymentStructure;
savedata python:here.getPaymentData(payment_method.id);
has_vat python:here.has_vat(euvat = savedata['cust_eu_vat'],
country = savedata['cust_country'] );
member_unit here/portal_currency_manager/getMemberMonetaryUnit;
shopmanager here/portal_shop_manager;
global tax python:0.0">
<tal:isForm condition="python:paymentstruct[2]['value'] == 'Form'">
<form class="group"
tal:define="action_dict python:paymentstruct[0];
method_dict python:paymentstruct[1];"
tal:attributes="action action_dict/value; method method_dict/value;">
<table tal:define="items here/listProducts">
<TR Class="NewsTitle">
<TD colspan="4" Class="NewsTitle" i18n:translate="">Order Summary</TD>
</TR>
<tr>
<th align="left">Product</th>
<th align="right">Quantity</th>
<th align="right">Price / Piece</th>
<th align="right">Total</th>
</tr>
<tal:items repeat="cartobj items">
<tr tal:define="productpath cartobj/getProductPath;
product cartobj/getProduct;
itemprice python:'%.2f' % cartobj.getExchangedPrice();
itemtotal python:'%.2f' % cartobj.getTotalPrice();">
<td tal:content="cartobj/title">Title</td>
<td tal:content="cartobj/getQuantity" align="right"></td>
<td align="right" tal:content="string:${itemprice} ${member_unit}">Price</td>
<td align="right" tal:content="string:${itemtotal} ${member_unit}">Total price</td>
</tr>
</tal:items>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr tal:condition="not:here/reachMinimumPrice">
<td colspan="3">Extra to reach minimum price:</td>
<td align="right">
<span tal:replace="python:'%.2f' % here.getExtraToReachMinimumPrice()" /> <span tal:replace="member_unit" />
</td>
</tr>
<tr>
<td colspan="3" i18n:translate="">Sub total:</td>
<td align="right" tal:define="global totalpay here/getCartTotal">
<span tal:replace="python:'%.2f' % here.getCartTotal()" /> <span tal:replace="member_unit" />
</td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr tal:condition="python:savedata.has_key('delivery_fee')">
<tal:delivery define="delivery python:shopmanager.getDeliveryFee(savedata['delivery_fee']);
global totalpay python:totalpay + delivery.getExchangedPrice();">
<td colspan="3">Send fee: <span tal:replace="delivery/title" /></td>
<td align="right">
<span tal:replace="python:'%.2f' % delivery.getExchangedPrice()" /> <span tal:replace="member_unit" />
</td>
</tal:delivery>
</tr>
<tr tal:condition="python:shopmanager.getCalculatedExchangeFee() > 0">
<td colspan="3">Exchange fee:</td>
<td align="right" tal:define="global totalpay python:totalpay + shopmanager.getCalculatedExchangeFee()">
<span tal:replace="python:'%.2f' % shopmanager.getCalculatedSendFee()" /> <span tal:replace="member_unit" />
</td>
</tr>
<tr tal:condition="has_vat">
<td colspan="3">VAT:</td>
<td align="right" tal:define="global tax python:totalpay * 0.196">
<span tal:replace="python:'%.2f' % (totalpay * 0.196)" /> <span tal:replace="member_unit" />
<span tal:replace="string:" tal:define="global totalpay python:totalpay * 1.196" />
</td>
</tr>
<tr>
<td colspan="3">Total amount:</td>
<td align="right"><span tal:replace="python:'%.2f' % totalpay" /> <span tal:replace="member_unit" /></td>
</tr>
</table>
<h2 i18n:translate="">Customer Information</h2>
<table>
<tal:props repeat="prop paymentstruct">
<tr>
<tal:good_props define="idx repeat/prop/index" condition="python: idx not in (0, 1, 2)">
<tal:hidden condition="python:not prop['user_defined']">
<tal:expr condition="exists:prop/expression">
<tal:expr_hidden
define="val python:prop['expression'] and payment_method.evaluateExpression(prop['expression'], payment_method) or prop['value']">
<input type="hidden" tal:attributes="name prop/id; value val" />
</tal:expr_hidden>
</tal:expr>
<tal:val condition="not:exists:prop/expression">
<input type="hidden" tal:attributes="name prop/id; value prop/value;" />
</tal:val>
</tal:hidden>
<tal:content condition="python:prop['user_defined']">
<div class="row" tal:define="id prop/id">
<td><span class="label" tal:content="prop/title" i18n:translate="">Prop</span></td>
<span class="field">
<!-- content -->
<tal:not_validation condition="not: prop/validation_info">
<td><span tal:define="propval python:savedata.has_key(prop['id']) and savedata[prop['id']] or ''" tal:replace="propval" /></td>
<input type="hidden" name="" value="" tal:define="propval python:savedata.has_key(prop['id']) and savedata[prop['id']] or ''"
tal:attributes="name prop/id; value propval" />
</tal:not_validation>
<tal:validate condition="prop/validation_info">
<!-- string or int -->
<tal:expr condition="exists:prop/expression">
<tal:expr_hidden
define="val python:prop['expression'] and payment_method.evaluateExpression(prop['expression'], payment_method) or prop['value']">
<input type="text" name="title" value="" tal:attributes="name id; value val;"
tal:condition="python:prop['type'] in ('string','int')" />
</tal:expr_hidden>
</tal:expr>
<!-- selection -->
<select tal:attributes="name id" tal:condition="python:prop['type'] == 'selection'">
<tal:expr define="expr_val python:payment_method.evaluateExpression(prop['expression'], payment_method)">
<tal:block condition="python:same_type(expr_val,{})">
<tal:block repeat="val expr_val/keys">
<option tal:attributes="value val;selected python:val==prop['value']" tal:content="python:expr_val[val]"></option>
</tal:block>
</tal:block>
<tal:block condition="python:same_type(expr_val,()) or same_type(expr_val,[])">
<tal:block repeat="val expr_val">
<option tal:attributes="value val;selected python:val==prop['value']" tal:content="val"></option>
</tal:block>
</tal:block>
</tal:expr>
</select>
<!-- multiple selection -->
<tal:block condition="python:prop['type'] == 'multiple selection'">
<tal:expr define="expr_val python:payment_method.evaluateExpression(prop['expression'], payment_method)">
<tal:block condition="python:same_type(expr_val,{})">
<tal:block repeat="val expr_val/keys">
<input type="checkbox"
tal:attributes="name id;value val;checked python:prop_['value'] and val in prop['value']" />&nbsp;
<span tal:replace="python:expr_val[val]">Value</span><br />
</tal:block>
</tal:block>
<tal:block condition="python:same_type(expr_val,()) or same_type(expr_val,[])">
<tal:block repeat="val expr_val">
<tal:block condition="python:same_type(val,{})">
<input type="checkbox"
tal:attributes="name id;value python:val.keys()[0];checked python:prop['value'] and val.keys()[0] in prop['value']" />&nbsp;
<span tal:replace="python:val[val.keys()[0]]">Value</span>
</tal:block>
<tal:block condition="not:python:same_type(val,{})">
<input type="checkbox"
tal:attributes="name id;value val;checked python:prop['value'] and val in prop['value']" />&nbsp;
<span tal:replace="val">Value</span>
</tal:block>
<br />
</tal:block>
</tal:block>
</tal:expr>
</tal:block>
<!-- boolean -->
<tal:block condition="python:prop['type'] == 'boolean'">
<input type="checkbox"
tal:attributes="name id;checked prop_value" />&nbsp;
<br />
</tal:block>
<!-- text -->
<tal:block condition="python:prop['type'] == 'text'">
<textarea tal:attributes="name id;value prop_value"></textarea>
<br />
</tal:block>
</tal:validate>
</span>
</div>
</tal:content>
</tal:good_props>
</tr>
</tal:props>
</table>
<div class="row" align="center">
<span class="label"></span>
<span class="field">
<input type="submit" class="context"
value="Confirm Order & Proceed to Payment Options..."
i18n:attributes="value"/>
</span>
</div>
<input type="hidden" name="tax:float" tal:attributes="value tax">
</form>
</tal:isForm>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<div metal:fill-slot="main"
tal:define="pss modules/Products/PythonScripts/standard">
<div CLASS="Desktop">
<TABLE BORDER="0" WIDTH="100%" cellspacing="3" cellpadding="3">
<TR>
<TD ALIGN="CENTER" VALIGN="top"
tal:content="structure here/computerproduct_presentation">
</TD>
</TR>
</TABLE>
</div>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<div metal:fill-slot="main"
tal:define="dummy python:request.set('quantity',1);
dummy python:request.set('product_path',here.getProductPath());
show_language_selector python:0;
show_breadcrumb python:0;
mtool here/portal_membership;
member mtool/getAuthenticatedMember;
ptool here/portal_properties">
<h1 i18n:translate="">Custommer Registration</h1>
<table>
<tr>
<td valign="top">
<h2 i18n:translate="">New Custommers</h2>
<p i18n:translate="">If you are a new custommer, please provide bellow your
personal information in order to let us identify you.</p>
<form method="POST" action="register_and_addToCart">
<span tal:repeat="item python:('color',
'quantity','product_path','processor','memory','disk','drive','setup',
'fs','root_partition','boot_partition','usr_partition','home_partition',
'var_partition','swap_partition','tmp_partition','free_partition', 'config_url',
'support','monitoring','backup','archive','hosting','keyboard')">
<input type="hidden" name="" value=""
tal:attributes="name item;
value python:getattr(request,item,'')">
</span>
<span tal:repeat="item request/variation_category_list | python:()">
<input type="hidden" name="variation_category_list:list"
value="" tal:attributes="value item"/>
</span>
<span tal:repeat="item python:here.getOptionValues('Option')">
<input type="hidden" name=""
value=""
tal:attributes="name python:'option_%s' % repeat['item'].number;
value item"
tal:condition="python:request.has_key('option_%s' % repeat['item'].number)">
</span>
<input type="hidden" name="last_visit:date" value=""
tal:attributes="value here/ZopeTime">
<input type="hidden" name="prev_visit:date" value=""
tal:attributes="value here/ZopeTime">
<table class="FormLayout">
<tr>
<th i18n:translate=""> Login Name </th>
<td>
<input type="text" name="username" size="30" value=""
tal:attributes="value request/username|nothing">
</td>
</tr>
<tr>
<th i18n:translate=""> Email Address </th>
<td align="left" valign="top">
<input type="text" name="email" size="30" value=""
tal:attributes="value request/email|nothing">
</td>
</tr>
<tbody tal:condition="python: not(ptool.validate_email)">
<tr>
<th i18n:translate=""> Password </th>
<td align="left" valign="top">
<input type="password" name="password" size="30">
</td>
</tr>
<tr>
<th i18n:translate=""> Password (confirm) </th>
<td align="left" valign="top">
<input type="password" name="confirm" size="30">
</td>
</tr>
<tr>
<th i18n:translate=""> Mail Password? </th>
<td>
<input type="checkbox" name="mail_me" size="30" id="cb_mailme" />
<em><label for="cb_mailme" i18n:translate="">Check this box to have your password
mailed to you.</label></em>
</td>
</tr>
</tbody>
</table>
<p align="center"><input type="submit" value=""
tal:attributes="value python:here.gettext.gettext('Register & Add to Cart')"
></p>
</form>
</td>
<td valign="top">
<h2 i18n:translate="">Existing Custommers</h2>
<p i18n:translate="">If you are a registered custommer, please provide your user
login and password in order to proceed.</p>
<form method="POST" action="login_and_addToCart">
<span tal:repeat="item python:('color',
'quantity','product_path','processor','memory','disk','drive','setup',
'fs','root_partition','boot_partition','usr_partition','home_partition',
'var_partition','swap_partition','tmp_partition','free_partition', 'config_url',
'support','monitoring','backup','archive','hosting','keyboard')">
<input type="hidden" name="" value=""
tal:attributes="name item;
value python:getattr(request,item,'')">
</span>
<span tal:condition="request/variation_category_list | nothing">
<span tal:repeat="item request/variation_category_list | python:()">
<input type="hidden" name="variation_category_list:list"
value="" tal:attributes="value item"/>
</span>
</span>
<span tal:repeat="item python:here.getOptionValues('Option')">
<input type="hidden" name=""
value=""
tal:attributes="name python:'option_%s' % repeat['item'].number;
value item"
tal:condition="python:request.has_key('option_%s' % repeat['item'].number)">
</span>
<table class="FormLayout">
<tr>
<td align="left" valign="top">
<strong i18n:translate=""> Login Name </strong>
</td>
<td align="left" valign="top">
<input type="TEXT" name="__ac_name" size="20" value="" tal:attributes="value python: request.get('__ac_name') or ''">
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong i18n:translate=""> Password </strong>
</td>
<td align="left" valign="top">
<input type="PASSWORD" name="__ac_password" size="20">
</td>
</tr>
<tr valign="top" align="left">
<td></td>
<td><input type="checkbox" name="__ac_persistent" value="1" checked
id="cb_remember" />
<label for="cb_remember" i18n:translate="">Remember my name.</label>
</td></tr>
</table>
<p align="center"><input type="submit" value=""
tal:attributes="value python:here.gettext.gettext('Login & Add to Cart')"
></p>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<div metal:fill-slot="main"
tal:define="dummy python:request.set('quantity',1);
dummy python:request.set('product_path',here.product_path);
dummy python:request.set('color','')">
<p><i i18n:translate="">Thank you for choosing Nagasaki. Some Nagasaki products are available with a choice of
hardware, software, and service options. Please use this form to configure your product.</i></p>
<span tal:define="global form_method string:'custommer_registration'" tal:condition="python:here.portal_membership.isAnonymousUser()"/>
<span tal:define="global form_method string:'login_and_addToCart'" tal:condition="python:not here.portal_membership.isAnonymousUser()"/>
<form method="POST" action="custommer_registration"
tal:attributes="action form_method">
<span tal:repeat="item python:('color',
'quantity','product_path','processor','memory','disk','drive',
'fs','root_partition','boot_partition','usr_partition','home_partition',
'var_partition','swap_partition','tmp_partition','free_partition', 'config_url',
'support','monitoring','backup','archive','hosting','keyboard')">
<input type="hidden" name="" value=""
tal:attributes="name item;
value python:getattr(request,item,'')">
</span>
<table>
<tr>
<td i18n:translate="">Option:</td>
<td>
<select name="setup">
<option tal:repeat="item python:here.getOptionValues('')"
value="Rouge (+300 EUR)"
tal:attributes="value python:item[0]"
tal:content="python:'%s (+%s)' % (item[0], item[1])"></option>
</select>
</td>
</tr>
<tr>
<td></td>
<td class="OptionHelp" i18n:translate="">Each Nasagaki product provides
multiple options and variations to filt your needs best.</td>
</tr>
</table>
<p align="center">
<input type="submit" name="submit" value=""
tal:attributes="value python:here.gettext.gettext('Proceed to registration')"
tal:condition="python:here.portal_membership.isAnonymousUser()">
<input type="submit" name="submit" value=""
tal:attributes="value python:here.gettext.gettext('Add to Cart')"
tal:condition="python:not here.portal_membership.isAnonymousUser()">
</p>
</form>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<?xml-stylesheet href="default_stylesheet" rel="stylesheet" type="text/css"?>
<span tal:replace="nothing">
<!--
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
Thierry Faucher <tf@nexedi.com>
Jean-Paul Smets <jp@nexedi.com>
This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-->
</span>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/tal/i18n"
metal:define-macro="master"
tal:define="lang python:here.gettext.get_selected_language();
affiliate_path here/AFFILIATE_PATH | string:;
site_url here/portal_url;
site_url string:$site_url/$lang/$affiliate_path;
is_anonymous python:here.portal_membership.isAnonymousUser();
is_member python:not is_anonymous;
is_manager python:
here.portal_membership.getAuthenticatedMember().has_role('Manager') or here.portal_membership.getAuthenticatedMember().has_role('Partner');
is_member python:is_manager or is_member;
show_menu here/show_menu | nothing;
show_menu python:show_menu or is_manager;
col_num python:3 - show_menu;
dummy python:request.set('currency_manager', here.getCurrencyManager());
portal_object python:here.portal_url.getPortalObject();
HTML_CHARSET here/HTML_CHARSET | nothing">
<!-- HTML Header -->
<head>
<title tal:content="here/getTranslatedTitle">
ERP5 Community: Download ERP5
</title>
<link rel="stylesheet" href="http://www.erp5.org/default_stylesheet" type="text/css" />
<META tal:condition="HTML_CHARSET" http-equiv="Content-Type" content=""
tal:attributes="content HTML_CHARSET" />
<META tal:condition="python: HTML_CHARSET is None" http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"/>
</head>
<body font="#000000">
<span tal:condition="HTML_CHARSET">
<span tal:condition="python:HTML_CHARSET == 'text/html; charset=utf-8'"
tal:define="dummy python:request.RESPONSE.setHeader('Content-Type',HTML_CHARSET)"/>
</span>
<!-- Top Bar: Global links and search -->
<span tal:replace="structure here/standard_top_bar"/>
<!-- Main Page -->
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<!-- Logo -->
<td colspan="2" rowspan="2" class="LogoBox" valign="top">
<div class="LogoBox">
<a href="http://www.erp5.org" tal:attributes="href site_url">
<img src="http://www.erp5.org/logo.png" border="0"
tal:attributes="src string:$site_url/logo.png" />
</a>
</div>
</td>
<!-- Title and Language -->
<td width="90%" class="TitleBox" tal:content="here/getTranslatedTitle">
Download ERP5
</td>
</tr>
<tr class="LanguageBox">
<td class="LanguageBox">
<span tal:condition="here/show_language_selector"
tal:replace="structure here/language_selector"/>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td valign="top" width="150"
tal:condition="show_menu">
<!-- Optional Action Box-->
<div class="ActionBox" tal:content="structure here/actions_box"
tal:condition="is_member" />
<!-- Main menu -->
<span tal:replace="structure here/menu_box"/>
<!-- Quick Login -->
<span tal:replace="structure here/quick_login"
tal:condition="here/show_quicklogin" />
</td>
<!-- Main Box -->
<td colspan="2" valign="top" class="Desktop"
tal:attributes="colspan col_num">
<!-- Main Box -->
<div class="Desktop">
</div>
<!-- Breadcrumb -->
<div class="breadcrumb" tal:condition="here/show_breadcrumb"
tal:content="structure here/breadcrumb" />
<!-- Desktop Header -->
<div class="Desktop">
<p class="DesktopStatusBar" tal:condition="request/portal_status_message | nothing"
tal:content="python:here.gettext(request.portal_status_message)">Message</p>
<span tal:condition="here/localHeader | nothing"
tal:replace="structure here/localHeader" />
</div>
<!-- Document -->
<div class="Document" metal:define-slot="main">
<p>The document</p>
</div>
<!-- Desktop Footer -->
<div class="Desktop">
<span tal:condition="here/localFooter | nothing"
tal:replace="structure here/localFooter"/>
</div>
</td>
</tr>
</tbody>
</table>
<!-- Legalese -->
<div class="legalinfo" tal:content="structure here/legal_footer">
<p>(c) ERP5 Community <br />
Content published under <a href="http://www.gpdl.org">GPDL</a> </p>
</div>
<!-- End -->
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<div metal:fill-slot="main"
tal:define="pss modules/Products/PythonScripts/standard">
<div CLASS="Desktop"
tal:define="code_societe python:'nexedi';
montantvat python:here.getTotalPriceVAT();
montant python:here.getTotalPrice();
payvat python:here.has_vat(euvat = here.getEUVat(),
country = here.getCountry() )">
<p><span i18n:translate="">Thank you very much for submitting an order. In order to confirm your order, please select a payment option with the form bellow. If you are not certain yet,
you may still access this order later by selecting the menu <b>My Orders</b> and confirm payment options. You may also</span> <a href="./order_cancel_form"><span i18n:translate="">cancel this order by clicking here</span></a>.</p>
<h1 i18n:translate="">Order Summary</h1>
<span tal:replace="structure here/shoporder_box" />
<h1 i18n:translate="">Payment Options</h1>
<p><span i18n:translate="">Storever Online accepts payments by money transfer or by credit card</span></p>
<h3 i18n:translate="">Online Payment</h3>
<p><span i18n:translate="">With our secure online payment system operated by CIC, you can simply use you credit card to pay</span> <b tal:condition="payvat" tal:content="montantvat" />
<b tal:condition="python:not payvat" tal:content="montant" /><b> EUR</b>
<span i18n:translate=""> online with the same or better level of security as in the real world.</span></p>
<center tal:define="code_societe python:'nexedi';
texte_bouton python:here.gettext('Secure Online Payment');
langue python:here.gettext.get_selected_language();
langue python:(langue == 'fr') * 'fr' + (langue != 'fr') * 'en';
TPE python:'/etc/cmmac/6496547.key';
url_banque python:'https://ssl.paiement.cic-banques.fr/paiement.cgi';
texte_libre python:'/'.join(here.getPhysicalPath()[1:]);
reference python:here.id;
url_retour_err python:here.secure_absolute_url() + '?portal_status_message=' + 'Online+Payment+Rejected';
url_retour_ok python:here.secure_absolute_url() + '?portal_status_message=' + 'Online+Payment+Accepted';">
<span tal:condition="payvat" tal:replace="structure python:here.payment.CreerFormulaireCM(url_retour_err=url_retour_err,url_retour_ok=url_retour_ok,texte_libre=texte_libre,reference=reference,code_societe=code_societe,texte_bouton=texte_bouton, langue=langue, TPE=TPE, url_banque=url_banque,montant=montantvat)"/>
<span tal:condition="python: not payvat" tal:replace="structure python:here.payment.CreerFormulaireCM(url_retour_err=url_retour_err,url_retour_ok=url_retour_ok,texte_libre=texte_libre,reference=reference,code_societe=code_societe,texte_bouton=texte_bouton, langue=langue, TPE=TPE, url_banque=url_banque,montant=montant)"/>
</center>
<h3 i18n:translate="">Money Transfer</h3>
<p><span i18n:translate="">If you prefer not to use your credit card online, please send</span> <b tal:condition="payvat" tal:content="montantvat" /><b tal:condition="python:not payvat" tal:content="montant" /><b> EUR</b> <span i18n:translate="">to Nexedi SARL bank account</span></p>
<p align="center">IBAN: FR76 3002 7175 3900 0410 2760 135</p>
<form method="post" action=""
tal:attributes="action python:'%s/order_status_modify' % here.secure_absolute_url()">
<input type="hidden" name="workflow_action" value="confirm" />
<input type="hidden" name="comment" value="Confirm payment by money transfer" />
<p align="center">
<input type="submit" value="Confirm Order and Pay by Money Transfer"
i18n:attributes="value" />
</p>
</form>
</div>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<tal:has_payment condition="exists:request/payment_method">
<tal:payment define="shopmanager here/portal_shop_manager;
currencymanager here/portal_currency_manager;
payment_method python:shopmanager.getPaymentMethod(request['payment_method']);
paymentstruct payment_method/getPaymentStructure;
paymentdata python:here.getPaymentData(request['payment_method'])">
<tal:isForm condition="python:paymentstruct[2]['value'] == 'Form'">
<form class="group" action="" method="post" tal:attributes="action here/secure_absolute_url">
<input type="hidden" name="paymentmethod_id" value="" tal:attributes="value payment_method/id" />
<span class="legend"><h2 i18n:translate="">Customer/Delivery Information</h2></span>
<table>
<tal:props repeat="prop paymentstruct" >
<tal:good_props define="idx repeat/prop/index;
prop_value prop/value"
condition="python: idx not in (0, 1, 2) and not prop['validation_info']">
<tal:hidden condition="python:not prop['user_defined']">
<tal:expr condition="exists:prop/expression">
<tal:expr_hidden
define="val python:prop['expression'] and payment_method.evaluateExpression(prop['expression'], payment_method) or prop['value']">
<input type="hidden" tal:attributes="name prop/id; value val" />
</tal:expr_hidden>
</tal:expr>
<tal:val condition="not:exists:prop/expression">
<input type="hidden" tal:attributes="name prop/id; value prop/value;" />
</tal:val>
</tal:hidden>
<tal:content condition="python:prop['user_defined']" define="id prop/id; prop_value python:''">
<div class="row"><tr>
<td valign="top">
<span class="label" tal:content="prop/title" i18n:translate="">Prop</span>
</td>
<span class="field">
<!-- string or int -->
<tal:expr condition="exists:prop/expression">
<tal:expr_text
define="val python:prop['expression'] and payment_method.evaluateExpression(prop['expression'], payment_method) or prop['value']">
<td tal:condition="python:prop['type'] in ('string','int')">
<!-- value python:paymentdata.has_key(id) and paymentdata[id] or val; -->
<input type="text" name="title" value="" tal:attributes="name id; value python:'';"
tal:condition="python:prop['type'] in ('string','int')" /></td>
</tal:expr_text>
</tal:expr>
<tal:val condition="not:exists:prop/expression">
<td tal:condition="python:prop['type'] in ('string','int')">
<!-- value python:paymentdata.has_key(id) and paymentdata[id] or prop['value']; -->
<input type="text" tal:attributes="name prop/id; value python:prop_value;" /></td>
</tal:val>
<!-- selection -->
<tal:block condition="python:prop['type'] == 'selection'"
tal:define="country_lang python:{'ja':'Japan','fr':'France'};
lang python:here.gettext.get_selected_language();
default_country python:country_lang.get(lang,'unknown')">
<td>
<select tal:attributes="name id" >
<tal:expr define="expr_val python:payment_method.evaluateExpression(prop['expression'], payment_method)">
<tal:block condition="python:same_type(expr_val,{})">
<tal:block repeat="val expr_val/keys">
<option tal:attributes="value val;selected python:val==prop['value'] or
(id == 'cust_country' and default_country == val and prop['value']=='')"
tal:content="python:expr_val[val]"></option>
</tal:block>
</tal:block>
<tal:block condition="python:same_type(expr_val,()) or same_type(expr_val,[])">
<tal:block repeat="val expr_val">
<option tal:attributes="value val;selected python:val==prop['value'] or
(id == 'cust_country' and default_country == val and prop['value']=='')"
tal:content="val"></option>
</tal:block>
</tal:block>
</tal:expr>
</select>
</td>
</tal:block>
<!-- multiple selection -->
<tal:block condition="python:prop['type'] == 'multiple selection'">
<td>
<tal:expr define="expr_val python:payment_method.evaluateExpression(prop['expression'], payment_method)">
<tal:block condition="python:same_type(expr_val,{})">
<tal:block repeat="val expr_val/keys">
<input type="checkbox"
tal:attributes="name id;value val;checked python:prop_['value'] and val in prop['value']" />&nbsp;
<span tal:replace="python:expr_val[val]">Value</span><br />
</tal:block>
</tal:block>
<tal:block condition="python:same_type(expr_val,()) or same_type(expr_val,[])">
<tal:block repeat="val expr_val">
<tal:block condition="python:same_type(val,{})">
<input type="checkbox"
tal:attributes="name id;value python:val.keys()[0];checked python:prop['value'] and val.keys()[0] in prop['value']" />&nbsp;
<span tal:replace="python:val[val.keys()[0]]">Value</span>
</tal:block>
<tal:block condition="not:python:same_type(val,{})">
<input type="checkbox"
tal:attributes="name id;value val;checked python:prop['value'] and val in prop['value']" />&nbsp;
<span tal:replace="val">Value</span>
</tal:block>
<br />
</tal:block>
</tal:block>
</tal:expr>
</td>
</tal:block>
<!-- boolean -->
<tal:block condition="python:prop['type'] == 'boolean'">
<td>
<input type="checkbox"
tal:attributes="name id;checked prop_value" />&nbsp;
<br />
</td>
</tal:block>
<!-- text -->
<tal:block condition="python:prop['type'] == 'text'">
<td>
<textarea tal:attributes="name id;value prop_value" rows="5" cols="40"></textarea>
<br />
</td>
</tal:block>
</tr></div>
</tal:content>
</tal:good_props>
</tal:props>
</table>
<div class="row">
<span class="label"><h2 i18n:translate="">Delivery Method</h2></span>
<span class="field" tal:define="deliveries shopmanager/listDeliveryFees;
member_unit here/portal_currency_manager/getMemberMonetaryUnit;">
<span tal:condition="not:shopmanager/isDeliveryNeeded">
Since you have only selected to buy downloads, no delivery method is needed
</span>
<table tal:condition="shopmanager/isDeliveryNeeded">
<tr tal:repeat="delivery deliveries">
<td valign="top">
<input type="radio" name="delivery_fee" value=""
tal:attributes="value delivery/id" checked
tal:condition="python:repeat['delivery'].number() == 1" />
<input type="radio" name="delivery_fee" value=""
tal:attributes="value delivery/id"
tal:condition="python:repeat['delivery'].number() != 1" />
</td>
<td>
<span tal:replace="python:here.gettext(delivery.title)" />
(<span tal:replace="python:'%s %.2f' % (member_unit, delivery.getPrice())" />)<br />
<span tal:replace="python:here.gettext(delivery.description)" />
</td>
</tr>
</table>
</span>
</div>
<div class="row" align="center">
<span class="label"></span>
<span class="field">
<input class="context" type="submit" name="setPaymentData:method" value="Continue"
i18n:attributes="value" />
</span>
</div>
</form>
</tal:isForm>
</tal:payment>
</tal:has_payment>
</div>
</body>
</html>
<div class="group"
tal:define="shopmanager here/portal_shop_manager;">
<table class="listing" align="center" cellpadding="0" cellspacing="0" tal:define="lines here/listOrderLines" tal:condition="lines">
<TR Class="NewsTitle">
<TD colspan="4" Class="NewsTitle" i18n:translate="">My Order</TD>
</TR>
<tr>
<th align="left" i18n:translate="">Product</th>
<th align="right" i18n:translate="">Quantity</th>
<th align="right" i18n:translate="">Price/Piece</th>
<th align="right" i18n:translate="">Total</th>
</tr>
<tal:lines repeat="line lines">
<tr class="odd" tal:define="isOdd repeat/line/odd" tal:attributes="class python:isOdd and 'even' or 'odd'">
<td tal:content="line/getTitle" i18n:translate="">Title</td>
<td tal:content="line/getQuantity" align="right" i18n:translate="">Quantity</td>
<td tal:content="line/getPrice" align="right" i18n:translate="">Price</td>
<td align="right"
tal:define="total python:line.getPrice() * line.getQuantity()"
tal:content="total" i18n:translate="">Total</td>
</tr>
</tal:lines>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr tal:condition="here/getSendFee">
<td colspan="3">Send fee: <span tal:replace="here/getSendFeeTitle" /></td>
<td tal:content="here/getSendFee" align="right">Send fee</td>
</tr>
<tr tal:condition="here/getExchangeFee">
<td colspan="3" i18n:translate="">Exchange fee:</td>
<td tal:content="here/getExchangeFee" align="right">Exc Fee</td>
</tr>
<tr tal:condition="python: here.getTax() > 0.0">
<td colspan="3" i18n:translate="">VAT:</td>
<td tal:content="here/getTax" align="right">Tax</td>
</tr>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr>
<td colspan="3" i18n:translate="">Total price:</td>
<td tal:content="python:here.getTotalPrice() + here.getTax()" align="right">Total</td>
</tr>
</table>
<h3 i18n:translate="">Customer Information</h3>
<div class="row">
<table>
<tr>
<td i18n:translate="">Name</td>
<td tal:content="here/getName"></td>
</tr>
<tr>
<td i18n:translate="">Organisation</td>
<td tal:content="here/getOrganisation"></td>
</tr>
<tr>
<td i18n:translate="">Address</td>
<td tal:content="here/getAddress"></td>
</tr>
<tr>
<td i18n:translate="">ZIP Code</td>
<td tal:content="here/getZipcode"></td>
</tr>
<tr>
<td i18n:translate="">City</td>
<td tal:content="here/getCity"></td>
</tr>
<tr>
<td i18n:translate="">Country</td>
<td tal:content="here/getCountry"></td>
</tr>
<tr>
<td i18n:translate="">Phone</td>
<td tal:content="here/getPhone"></td>
</tr>
<tr>
<td i18n:translate="">Email</td>
<td tal:content="here/getEmail"></td>
</tr>
<tr>
<td i18n:translate="">VAT Number</td>
<td tal:content="here/getEUVat"></td>
</tr>
<tr>
<td i18n:translate="">Billing Address</td>
<td tal:content="here/getBillingAddress"></td>
</tr>
</table>
</div>
</div>
<html metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<span tal:replace="structure here/shoporder_box" />
<span tal:define="actions python:here.portal_actions.listFilteredActionsFor(here);
object_actions python:actions['workflow'];
review_state python:here.portal_workflow.getInfoFor(here, 'order_state', '')">
<h3><span i18n:translate="">Order Status:</span> <span
tal:replace="python:here.gettext(review_state)"/></h3>
<p>
<span i18n:translate="">Available Order Actions:</span>
<i tal:repeat="item object_actions">
<a href="" tal:attributes="href python:here.secure_absolute_url() + '/' +
item['url'].split('/')[-1]" tal:content="python:here.gettext(item['name'])"></a>
&nbsp;
</i>
<span tal:replace="string:'None'" tal:condition="python: len(object_actions) == 0" />
</p>
</span>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main" i18n:domain="mmmshop">
<div class="Desktop"
tal:define="pref_cur here/portal_currency_manager/getMemberCurrency;
member_unit here/portal_currency_manager/getMemberMonetaryUnit;
items here/listProducts;
shopmanager here/portal_shop_manager;">
<span tal:condition="items">
<form action="" method="post" class="group" tal:attributes="action here/local_absolute_url">
<table border="0" WIDTH="100%">
<tr Class="NewsTitle">
<td colspan="4" Class="NewsTitle"
i18n:translate="">My Shopping Cart</td>
</tr>
<tr>
<th i18n:translate="">Product</th>
<th i18n:translate="">Quantity</th>
<th i18n:translate="">Price / Piece</th>
<th i18n:translate="">Total</th>
</tr>
<tal:items repeat="cartobj items">
<tr tal:define="productpath cartobj/getProductPath;
product cartobj/getProduct;
itemprice python:'%.2f' % cartobj.getExchangedPrice();
itemtotal python:'%.2f' % cartobj.getTotalPrice();">
<td tal:content="cartobj/title" i18n:translate="">Title</td>
<td><input type="text" size="5" name="" value="" tal:attributes="name string:${cartobj/id}_quantity:int; value cartobj/getQuantity" /></td>
<td align="right" tal:content="string:${itemprice} ${member_unit}">Price</td>
<td align="right" tal:content="string:${itemtotal} ${member_unit}">Total price</td>
</tr>
</tal:items>
<tr>
<td colspan="4"><hr /></td>
</tr>
<tr tal:condition="not:here/reachMinimumPrice">
<td colspan="3">Extra to reach minimum price:</td>
<td align="right">
<span tal:replace="python:'%.2f' % here.getExtraToReachMinimumPrice()" /> <span tal:replace="member_unit" />
</td>
</tr>
<tr>
<td colspan="3" i18n:translate="">Sub total:</td>
<td align="right"><span tal:replace="python:'%.2f' % here.getCartTotal()" /> <span tal:replace="member_unit" /></td>
</tr>
<tr>
<td colspan="4">
<input class="context" type="submit" name="clearCart:method" value="Clear Cart" i18n:attributes="value" /> <input class="context"
type="submit" name="edit:method" value="Update" i18n:attributes="value" />
</td>
</tr>
</table>
</form>
<form class="group" action="" method="post" tal:attributes="action here/local_absolute_url">
<input name="payment_method" type="hidden"
tal:attributes="value python:here.portal_shop_manager.listEnabledPaymentMethods()[0].id"/>
<div class="row" align="right">
<span class="label"></span>
<span class="field">
<input class="context" type="submit" name="prepareOrder:action" value="Checkout" i18n:attributes="value" />
</span>
</div>
</form>
</span>
<span class="legend" i18n:translate=""
tal:condition="python:len(items) == 0">Your Shopping Cart is Empty</span>
</div>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="group" tal:define="orders python:portal_object.portal_shop_manager.getMemberOrders();
listurl request/URL;
user python:here.portal_membership.getAuthenticatedMember().getUserName();
mem_folder python:here.portal_membership.getHomeFolder()">
<TABLE BORDER="0" WIDTH="100%">
<TR Class="NewsTitle">
<TD colspan="6" Class="NewsTitle" i18n:translate="">My Orders</TD>
</TR>
<TR>
<TD>&nbsp;</TD>
<TD><FONT SIZE="1"><B i18n:translate="">Order Date</B></FONT></TD>
<TD><FONT SIZE="1"><B i18n:translate="">Lines in order</B></FONT></TD>
<TD><FONT SIZE="1"><B i18n:translate="">Total excl. VAT</B></FONT></TD>
<TD><FONT SIZE="1"><B i18n:translate="">Order ID</B></FONT></TD>
<TD><FONT SIZE="1"><B i18n:translate="">Status</B></FONT></TD>
</TR>
<TR tal:repeat="orderobj orders">
<TD><FONT SIZE="2"><A HREF=""
tal:attributes="href python:'%s?display_order_content=true&orderpath=%s' % (listurl, orderobj.absolute_url(relative=1))"
i18n:translate="">Content</A></FONT></TD>
<TD><FONT SIZE="2" tal:content="python:orderobj.created().strftime('%Y/%m/%d %H:%M')"
></FONT></TD>
<TD><FONT SIZE="2" tal:content="python:len(orderobj.listOrderLines())"
></FONT></TD>
<TD><FONT SIZE="2" tal:content="python:orderobj.getTotalPrice()"
></FONT></TD>
<TD><FONT SIZE="2"><A HREF="" tal:content="python:orderobj.id"
tal:attributes="href python:here.secure_absolute_url(target=orderobj)"></A></FONT></TD>
<TD><FONT SIZE="2"
tal:define="review_state python:here.portal_workflow.getInfoFor(here, 'order_state', '')">
<span tal:replace="review_state" tal:condition="review_state" />
</FONT></TD>
</TR>
</TABLE>
<span tal:condition="request/display_order_content | nothing"
tal:replace="structure python:here.restrictedTraverse(request['orderpath']).shoporder_box()"/>
</div>
</div>
</body>
</html>
<html metal:use-macro="here/main_template/macros/master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<div metal:fill-slot="main"
tal:define="dummy python:request.set('local_currency_name', here.getLocalCurrencyName())">
<form ACTION="update_simple_product" MEthOD="POST" ENCTYPE="multipart/form-data">
<table BORDER="0" WIDth="100%" CLASS="FormLayout">
<tr>
<th VALIGN="top">Navn:</th>
<td>
<input TYPE="text" name="prod_name" value="title" tal:attributes="value here/title">
<dl CLASS="FieldHelp">
<dd>The name of the product.</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Short Description:</th>
<td>
<textarea name="description" ROWS="5" COLS="30" tal:content="here/description">Description</textarea>
<dl CLASS="FieldHelp">
<dd>The description of the product.</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Long Description:</th>
<td>
<textarea name="text:text"
rows="20" cols="80" tal:content="here/text">Long Description</textarea>
</td>
</tr>
<tr>
<th VALIGN="top">Category:</th>
<td>
<select name="prod_category:list" SIZE="3" MULTIPLE
tal:define="contentSubject here/Subject;
allowedSubjects python:here.portal_metadata.listAllowedSubjects(here.this())">
<span tal:repeat="item allowedSubjects">
<option value="The subject" tal:attributes="value item" tal:content="item"
tal:condition="python: item not in contentSubject">The category</option>
<option value="The subject" tal:attributes="value item" tal:content="item"
tal:condition="python: item in contentSubject" selected>The category</option>
</span>
</select>
<dl CLASS="FieldHelp">
<dd>You should place your procu in one - or more - category, so visitors on the site can find your product easier.
Pick the category that fits your product best.</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Price:</th>
<td>
<input TYPE="text" name="price:float" value="Price" tal:attributes="value here/price">
<dl CLASS="FieldHelp">
<dd>The price of your product (in <span tal:replace="request/local_currency_name" />).</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Days to deliver:</th>
<td>
<input TYPE="text" name="delivery_days:int" value="Delivery days" tal:attributes="value here/delivery_days">
<dl CLASS="FieldHelp">
<dd>How many days will it take to deliver your product (as precise as possible).</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Thumbnail picture:</th>
<td>
<input TYPE="file" name="thumbnail" value="" tal:attributes="value here/thumbnail"><BR>
<dl CLASS="FieldHelp">
<dd>A little picturre of the product that can be shown in the product catalog.</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Large picture:</th>
<td>
<input TYPE="file" name="image" tal:attributes="value here/image"><BR>
<dl CLASS="FieldHelp">
<dd>Picture of your product that will be used at the product page.</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Product Path:</th>
<td>
<input TYPE="text" name="product_path" value="" tal:attributes="value here/product_path | string:"><BR>
<dl CLASS="FieldHelp">
<dd>Product path.</dd>
</dl>
</td>
</tr>
<tr>
<th VALIGN="top">Options:</th>
<td>
<span tal:repeat="item here/getOptions">
<input TYPE="text" name="" value=""
tal:define="number repeat/item/number"
tal:attributes="name python:'option_%s' % number;
value item" />&nbsp;
<input TYPE="text" name="optionprice_0:float" value="10.0"
tal:define="number repeat/item/number"
tal:attributes="name python:'optionprice_%s:float' % number;
value python:here.getOptionPrice(item)" /><br>
</span>
<input TYPE="text" name="option_new" value="">&nbsp;
<input TYPE="text" name="optionprice_new:float" value="0.0">
<dl CLASS="FieldHelp">
<dd>The price of service options.</dd>
</dl>
</td>
</tr>
<tr>
<td COLSPAN="2"><input TYPE="submit" value=" Save "></td>
</tr>
</table>
<input TYPE="hidden" name="isCredit" value="0" >
</form>
</div>
</body>
</html>
<span tal:define="lang python:here.gettext.get_selected_language();
affiliate_path here/AFFILIATE_PATH | string:;
portal_url here/portal_url;
">
<a class="topbanner"
href=""
tal:attributes="href string:${portal_url}/${lang}/${affiliate_path}"
i18n:translate="">Products</a>&nbsp;|&nbsp;
<tal:menu
tal:condition="python: not here.portal_membership.isAnonymousUser()">
<a class="topbanner"
href="&dtml-secure_url;/&dtml-lang;/&dtml-affiliate_path;shoppingcart"
tal:attributes="href string:${portal_url}/${lang}/${affiliate_path}shoppingcart"
i18n:translate="">My Cart</a>&nbsp;|&nbsp;
</tal:menu>
<a class="topbanner"
href="&dtml-secure_url;/&dtml-lang;/&dtml-affiliate_path;order_list"
tal:attributes="href string:${portal_url}/${lang}/${affiliate_path}order_list"
i18n:translate="">My Orders</a>&nbsp;|&nbsp;
<a class="topbanner"
tal:condition="python: not here.portal_membership.isAnonymousUser()"
href="&dtml-secure_url;/&dtml-lang;/&dtml-affiliate_path;logout"
tal:attributes="href string:${portal_url}/${lang}/${affiliate_path}logout"
i18n:translate="">Logout</a>
</span>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment