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
This diff is collapsed.
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)
This diff is collapsed.
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-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)
This diff is collapsed.
<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.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>
<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">
<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>
This diff is collapsed.
<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