Product Template in SS 7.1.4 / Translation issue

General ShopSite user discussion

Product Template in SS 7.1.4 / Translation issue

Postby Nikolaus Gruchot » Thu Jul 28, 2005 5:32 am

Hello there,

I am curently using the built-in "Default Product Template" for all our
products.

Now I want to change so little things to the layout.

I have copied the "DefaultCustomProductTemplate" into a new file and
assigned it (without any modification) to one product to check out the
display.

I have understood that this template removes the CheckOut button which is
included in the build in template. No big deal.

What I do not get it the fact that with this copied custom template I am
always getting the english wording for quantity before the add to cart
button.

Quantity [1 ] In den Warenkorb


Correct would be using the translated strings from the back office:

Menge [1 ] In den Warenkorb


I think the word "Quantity" is hard coded somewhere and does not use the
correct string. But where can I find and modify this?!

TIA,

Niko
Nikolaus Gruchot
 

Re: Product Template in SS 7.1.4 / Translation issue

Postby Jim » Thu Jul 28, 2005 10:58 am

The section of code that is putting out the "Quantity" is in an include
file called Product-AddToCartButton.
here is the section of code that does it
------------------
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- IF PRODUCT.DisplayOrderingOptions --]
#do nothing
[-- ELSE --]
[-- IF VAR.MoreInfoPage "yes" --]
<br>
[-- END_IF --]
[-- END_IF --]
Quantity <input type=text size=2 name="[-- PRODUCT.RecordNumber
--]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
---------------------
You could replace the word "Quantity" in the line
Quantity <input type=text size=2 name="[-- PRODUCT.RecordNumber
--]:qnty" value="1" >&nbsp;&nbsp;

with "Menge" or you could use the tag [-- Store.Quantity --] to pull the
text from the backoffice settings. Note that the text for "Quantity" on
Preferences > Store Text> Shopping cart screen is used in several places
in the store, i.e. the product table in the shopping cart, the quantity
pricing table on store pages and if you implement the above change it
would be used for the product quantity input box on store pages. There
may be different terms you would want to use in some of these places, if
so you would want to hardcode the text in the template.

Jim

Nikolaus Gruchot wrote:
Hello there,

I am curently using the built-in "Default Product Template" for all our
products.

Now I want to change so little things to the layout.

I have copied the "DefaultCustomProductTemplate" into a new file and
assigned it (without any modification) to one product to check out the
display.

I have understood that this template removes the CheckOut button which is
included in the build in template. No big deal.

What I do not get it the fact that with this copied custom template I am
always getting the english wording for quantity before the add to cart
button.

Quantity [1 ] In den Warenkorb


Correct would be using the translated strings from the back office:

Menge [1 ] In den Warenkorb


I think the word "Quantity" is hard coded somewhere and does not use the
correct string. But where can I find and modify this?!

TIA,

Niko

Jim
 

Re: Product Template in SS 7.1.4 / Translation issue

Postby Nikolaus Gruchot » Mon Aug 01, 2005 8:31 am

Hello Jim,

ok. This was what I was looking for. I want to be consistent with the
wording through the store. So I am using [-- Store.Quantity --].

The product page and the product more information page now display the
correct wording. However I have the problem, that the add to cart button on
the more information page does not have the form tags in the source code and
therefore does not add the product to the cart?! I wonder where this is
coming from as I did not much more then to copy the shopsite templates and
renamed them.

To make sure I have re-copied the shopsite DefaultCustomProductTemplate just
by renaming it and assigning it to a product. The Add to Cart button does
not work on the more information page.

According to the source code there is a problem with a VAR: <!-- VAR
ADDBUTTONGRAPHIC IS NOT DEFINED -->?!

Sorry I am to blind to find the spot in the code to hit with the hammer. Can
somebody put his finger there for me?!

This is the source code from the product page:

<form action="http://www.danshop.com/cgi-bin/shopsite/sc/order.cgi"
method=post>
<table class="Product">
<tr>
<td class="ProductGraphicLeft" valign="top">
<a href="http://www.danshop.com/12045.html"><img
src="http://www.danshop.com/media/annepapiert.jpg" width=75 height=96
alt="annepapiert.jpg" hspace=3 vspace=3 border=0></a>
</td> <!-- This closes the product graphic cell -->
<td valign="top" class="ProductText"> <!-- This opens the text cell -->
<b> <a href="http://www.danshop.com/12045.html">Laerdal
Diagrammpapier für Recording Resusci Anne</a>
</b>
<font face="Arial, Helvetica, sans serif">
<br>
<Small><b>Euro&nbsp;50,40</b></Small> </font>
<br>
<Small>120450</Small>
<br><a href="http://www.watersafety.net/d/order/dstatus.htm"
target="_blank"><img border="0" src="images/dir/lief/wuhr.gif" width="27"
height="16" alt="Artikel wird nach der Bestellung beim Lieferanten geordert.
Versandfertig in 1-2 Wochen"></a>
<br>Original Laerdal Zubehör. Diagrammpapier für die Laerdal Recording
Resusci Anne Ausbildungpuppe.<br>
<input type=hidden name=storeid value=*1237fdbc5aa30c689d4025>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=439>
<!-- VAR MOREINFOPAGE IS NOT DEFINED -->
Menge <input type=text size=2 name="439:qnty" value="1" >&nbsp;&nbsp;
<!-- VAR ADDBUTTONGRAPHIC IS NOT DEFINED -->
<input type=image src="http://www.danshop.com/media/indenwarenkorb.gif"
align="middle" width="134" height="22" alt="Artikel in den Warenkorb
legen/Add to Cart" border="0">
</td> <!-- Close cell for product name and description -->
</tr>
</table>
</form>
-----------------------------------------------------------
This is the source code on the generated more information page:

<img src="http://www.danshop.com/media/annepapierp.jpg" width=250
height=321 alt="annepapierp.jpg" hspace=3 vspace=3 border=0 align="left">
<h2>Laerdal Diagrammpapier für Recording Resusci Anne</h2>
<br>
<Small><b>Euro&nbsp;50,40</b></Small>
<br>
<Small>120450</Small>
<br>
<br><a href="http://www.watersafety.net/d/order/dstatus.htm"
target="_blank"><img border="0" src="images/dir/lief/wuhr.gif" width="27"
height="16" alt="Artikel wird nach der Bestellung beim Lieferanten geordert.
Versandfertig in 1-2 Wochen"></a>
<br>Original Laerdal Zubehör.<br>Diagrammpapier für die Laerdal Recording
Resusci Anne Ausbildungpuppe.
<br>
<center>
<input type=hidden name=storeid value=*108bd149c706a3f0df90>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=439>
<br>
Menge <input type=text size=2 name="439:qnty" value="1"
&nbsp;&nbsp;
!-- VAR ADDBUTTONGRAPHIC IS NOT DEFINED --

<input type=image src="http://www.danshop.com/media/indenwarenkorb.gif"
align="middle" width="134" height="22" alt="Artikel in den Warenkorb
legen/Add to Cart" border="0">
</center>

--------------------

The copied shopsite product template looks like this:

# Generic Product Template with No "View Cart" button

#########################
[-- DEFINE SUBPRODUCT --]
#########################
[-- IF VAR.MoreInfoTemplate --]
<div class="Subproduct">
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
[-- INCLUDE Subproduct-Name PROCESS --]
[-- INCLUDE Subproduct-Price PROCESS --]
[-- INCLUDE Subproduct-AddToCartButton PROCESS --]
[-- INCLUDE Subproduct-ViewCartButton PROCESS --]

</div>
[-- ELSE --]
[-- INCLUDE Subproduct-Name PROCESS --]
[-- INCLUDE Product-Price PROCESS --]
[-- INCLUDE Subproduct-AddToCartButton PROCESS --]
[-- INCLUDE Subproduct-ViewCartButton PROCESS --]

[-- END_IF --]

#############################
[-- END_DEFINE SUBPRODUCT --]
#############################



######################
[-- DEFINE PRODUCT --]
######################
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
#[-- VAR.Form no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]

### Start the form for Add to Cart button ###
[-- IF PRODUCT.Subproduct --]
# do nothing
[-- ELSE --]
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
[-- END_IF --]

#####################
# GRAPHIC ALIGNMENT #
#####################
[-- INCLUDE Product-GraphicAlign PROCESS --]

####################
# PRODUCT GRAPHIC #
####################
[-- INCLUDE Product-Graphic PROCESS --]

########################
# PRODUCT NAME #
########################
[-- INCLUDE Product-Name PROCESS --]

########################
# PRODUCT SUBPRODUCTS #
########################
[-- IF PRODUCT.Subproduct --]
# Product has subproducts, so just show description for this product
# and then loop through subproducts
[-- INCLUDE Product-Description PROCESS --]

[-- VAR.MoreInfo no --]

[-- LOOP SUBPRODUCTS --]
[-- SUBPRODUCTS --]
[-- END_LOOP SUBPRODUCTS --]

[-- ELSE --]
# Product does not have subproducts

####################
# PRODUCT PRICE #
####################
[-- IF PRODUCT.QuantityPricing --]
#do nothing
[-- ELSE --]
[-- INCLUDE Product-Price-wsgmbh PROCESS --]
[-- END_IF --]

########################
# PRODUCT SKU #
########################
[-- INCLUDE Product-Sku PROCESS --]

########################################
# PRODUCT FIELD1/LIEFERSTATUS #
########################################
[-- INCLUDE Product-Field1-wsgmbh PROCESS --]

########################
# PRODUCT DESCRIPTION #
########################
[-- INCLUDE Product-Description PROCESS --]

#######################
# ADD TO CART BUTTON #
#######################
[-- INCLUDE Product-AddToCartButton-wsgmbh PROCESS --]

# end the IF PRODUCT.subproducts
[-- END_IF --]

###########################
# PRODUCT GRAPHIC #
# align=right, wrap=off #
###########################
[-- INCLUDE Product-GraphicRight PROCESS --]

[-- IF PRODUCT.Subproduct --]
# do nothing
[-- ELSE --]
</form>
[-- END_IF --]

[-- END_DEFINE PRODUCT --]



#############################
[-- DEFINE MORE_INFO_PAGE --]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
#############################
[-- VAR.MoreInfo "yes" --]

[-- IF VAR.MoreInfoTemplate --]
[-- INCLUDE VAR.MoreInfoTemplate PROCESS --]
[-- ELSE --]
[-- INCLUDE Classic-MoreInfoPage-wsgmbh PROCESS --]
[-- END_IF --]

[-- VAR.MoreInfo "" --]
[-- END_DEFINE MORE_INFO_PAGE --]



------------------------------------

This is Classic-MoreInfoPage-wsgmbh:

### Default More Info Page Template ###

<html>
[-- INCLUDE MoreInfo-Head PROCESS --]
#[-- INCLUDE Classic-MoreInfo.css PROCESS --]
</head>

[-- VAR.PageMargins "No" --]

[-- INCLUDE MoreInfo-Body PROCESS --]

[-- IF MORE_INFO.DisplayPageHeader --]
<div class="header">[-- HEADER --]</div>
[-- END_IF --]

[-- IF PRODUCT.MoreInformationGraphic --]
<img [-- PRODUCT.MoreInformationGraphic Remove_HTML --] align="left">
[-- END_IF --]

[-- IF PRODUCT.DisplayName --]
[-- IF PRODUCT.Subproduct --]
<h2>[-- PRODUCT.Name --]</h2>
[-- ELSE_IF PRODUCT.VariablePrice? --]
[-- IF PRODUCT.VariableName? --]
[-- STORE.ProductName --]: <input type=text name="[--
PRODUCT.RecordNumber --]:name" size="20" maxlength="100" value="">
[-- ELSE --]
<h2>[-- PRODUCT.Name --]</h2>
[-- END_IF --]
[-- ELSE --]
<h2>[-- PRODUCT.Name --]</h2>
[-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.QuantityPricing --]
#do nothing
[-- ELSE --]
[-- INCLUDE Product-Price PROCESS --]
[-- END_IF --]


[-- IF PRODUCT.Subproduct --]
# don't display the SKU
[-- ELSE --]
[-- INCLUDE Product-Sku PROCESS --]<br>
[-- END_IF --]

########################################
# PRODUCT FIELD1/LIEFERSTATUS #
########################################
[-- INCLUDE Product-Field1-wsgmbh PROCESS --]

<br>[-- PRODUCT.MoreInformationText --]

<br>
[-- IF PRODUCT.Subproduct --]
# Product has subproducts
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]
[-- ELSE --]
# Product does not have subproducts

#######################
# ADD TO CART BUTTON #
#######################
<center>
[-- INCLUDE Product-AddToCartButton-wsgmbh PROCESS --]

</center>

# end the IF PRODUCT.subproducts
[--END_IF--]

<br>

[-- IF MORE_INFO.DisplayPageFOOTER --]
[-- FOOTER --]
[-- END_IF --]

</body>
</html>

---------------------
And this is Product-AddToCartButton-wsgmbh:

#######################
# ADD TO CART BUTTON #
#######################
[-- IF PRODUCT.QuantityPricing --]
<div class="QPtable">
[-- PRODUCT.QuantityPricing --]
</div>
[-- END_IF --]

<input type=hidden name=storeid value=[-- STORE_ID --]>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]>

[-- IF PRODUCT.DisplayOrderingOptions --]
[-- IF PRODUCT.OptionText --]
<br>[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- IF PRODUCT.DisplayOrderingOptions --]
#do nothing
[-- ELSE --]
[-- IF VAR.MoreInfoPage "yes" --]
<br>
[-- END_IF --]
[-- END_IF --]
[-- Store.Quantity --] <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

[-- IF VAR.AddButtonGraphic --]
<input type=image class="add" src="[-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/[-- VAR.AddButtonGraphic --]" name="Add to Cart" alt="Add to
Cart">
[-- ELSE_IF ADDIMAGE? --]
<input type=image [--ADDIMAGE--]>
[-- ELSE --]
<input class="add" type=submit value="[-- ADDTEXT --]">
[-- END_IF --]

----------------------


Regards,

Niko


"Jim" <jstavast@xmission.com> schrieb im Newsbeitrag
news:dcb6cc$kp6$1@eval.shopsite.com...
The section of code that is putting out the "Quantity" is in an include
file called Product-AddToCartButton.
here is the section of code that does it
------------------
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- IF PRODUCT.DisplayOrderingOptions --]
#do nothing
[-- ELSE --]
[-- IF VAR.MoreInfoPage "yes" --]
br
[-- END_IF --]
[-- END_IF --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
---------------------
You could replace the word "Quantity" in the line
Quantity <input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty"
value="1" >&nbsp;&nbsp;

with "Menge" or you could use the tag [-- Store.Quantity --] to pull the
text from the backoffice settings. Note that the text for "Quantity" on
Preferences > Store Text> Shopping cart screen is used in several places
in the store, i.e. the product table in the shopping cart, the quantity
pricing table on store pages and if you implement the above change it
would be used for the product quantity input box on store pages. There
may be different terms you would want to use in some of these places, if
so you would want to hardcode the text in the template.

Jim
Nikolaus Gruchot
 

Re: Product Template in SS 7.1.4 / Translation issue

Postby jim » Tue Aug 02, 2005 9:15 pm

Niko,
I have verified that when the DefaultCustomProductTemplate is used with
other templates where the VAR.addbuttongraphic is not defined, you will
not get an add button on the more info page. This is the case with the
template you are using. To get around the problem you can add the line
[-- VAR.ADDBUTTONGRAPHIC <your graphic name here> --] to the product
template just after the [-- Define Product --] tag. There is another
slight problem in that the code is looking for the graphic in the
media/themesmedia directory which is the place where the images
associated with the themes are placed. This directory is normally not
accessible for the merchant (at least not through the ShopSite
interface) but if you have access to your server you could put your
image in that directory and it should work (give it the same permission
and ownership as other files in the directory).

The custom templates that ship with ShopSite are designed to work as
sets with certain product templates going with certain page templates
and they may not always work with other templates. They are also quite
complex in nature as they need to take into account the many options
that are available in the page or product. I have found that for most
merchants that complexity is not needed since the merchant know how they
are going to setup their product/page data and how they want it to look
on the final page.

It is often easier to design the page and product layout as you want it
and then create the template to reflect that look rather than to try and
modify one of the supplied templates to fit. I generally also find it
easier to limit the number of include files to just a few, so that it is
easier to see what the whole template is composed of rather than looking
in a dozen or so files.

hope that helps.

Jim


Nikolaus Gruchot wrote:
Hello Jim,

ok. This was what I was looking for. I want to be consistent with the
wording through the store. So I am using [-- Store.Quantity --].

The product page and the product more information page now display the
correct wording. However I have the problem, that the add to cart button on
the more information page does not have the form tags in the source code and
therefore does not add the product to the cart?! I wonder where this is
coming from as I did not much more then to copy the shopsite templates and
renamed them.

To make sure I have re-copied the shopsite DefaultCustomProductTemplate just
by renaming it and assigning it to a product. The Add to Cart button does
not work on the more information page.

According to the source code there is a problem with a VAR: <!-- VAR
ADDBUTTONGRAPHIC IS NOT DEFINED -->?!

Sorry I am to blind to find the spot in the code to hit with the hammer. Can
somebody put his finger there for me?!

This is the source code from the product page:

form action="http://www.danshop.com/cgi-bin/shopsite/sc/order.cgi"
method=post
table class="Product"
tr
td class="ProductGraphicLeft" valign="top"
a href="http://www.danshop.com/12045.html"><img
src="http://www.danshop.com/media/annepapiert.jpg" width=75 height=96
alt="annepapiert.jpg" hspace=3 vspace=3 border=0></a
/td> <!-- This closes the product graphic cell --
td valign="top" class="ProductText"> <!-- This opens the text cell --
b> <a href="http://www.danshop.com/12045.html">Laerdal
Diagrammpapier für Recording Resusci Anne</a
/b
font face="Arial, Helvetica, sans serif"
br
Small><b>Euro&nbsp;50,40</b></Small> </font
br
Small>120450</Small
br><a href="http://www.watersafety.net/d/order/dstatus.htm"
target="_blank"><img border="0" src="images/dir/lief/wuhr.gif" width="27"
height="16" alt="Artikel wird nach der Bestellung beim Lieferanten geordert.
Versandfertig in 1-2 Wochen"></a
br>Original Laerdal Zubehör. Diagrammpapier für die Laerdal Recording
Resusci Anne Ausbildungpuppe.<br
input type=hidden name=storeid value=*1237fdbc5aa30c689d4025
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=439
!-- VAR MOREINFOPAGE IS NOT DEFINED --
Menge <input type=text size=2 name="439:qnty" value="1" >&nbsp;&nbsp;
!-- VAR ADDBUTTONGRAPHIC IS NOT DEFINED --
input type=image src="http://www.danshop.com/media/indenwarenkorb.gif"
align="middle" width="134" height="22" alt="Artikel in den Warenkorb
legen/Add to Cart" border="0"
/td> <!-- Close cell for product name and description --
/tr
/table
/form
-----------------------------------------------------------
This is the source code on the generated more information page:

img src="http://www.danshop.com/media/annepapierp.jpg" width=250
height=321 alt="annepapierp.jpg" hspace=3 vspace=3 border=0 align="left"
h2>Laerdal Diagrammpapier für Recording Resusci Anne</h2
br
Small><b>Euro&nbsp;50,40</b></Small
br
Small>120450</Small
br
br><a href="http://www.watersafety.net/d/order/dstatus.htm"
target="_blank"><img border="0" src="images/dir/lief/wuhr.gif" width="27"
height="16" alt="Artikel wird nach der Bestellung beim Lieferanten geordert.
Versandfertig in 1-2 Wochen"></a
br>Original Laerdal Zubehör.<br>Diagrammpapier für die Laerdal Recording
Resusci Anne Ausbildungpuppe.
br
center
input type=hidden name=storeid value=*108bd149c706a3f0df90
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=439
br
Menge <input type=text size=2 name="439:qnty" value="1"
&nbsp;&nbsp;
!-- VAR ADDBUTTONGRAPHIC IS NOT DEFINED --
input type=image src="http://www.danshop.com/media/indenwarenkorb.gif"
align="middle" width="134" height="22" alt="Artikel in den Warenkorb
legen/Add to Cart" border="0"
/center

--------------------

The copied shopsite product template looks like this:

# Generic Product Template with No "View Cart" button

#########################
[-- DEFINE SUBPRODUCT --]
#########################
[-- IF VAR.MoreInfoTemplate --]
div class="Subproduct"
form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post
[-- INCLUDE Subproduct-Name PROCESS --]
[-- INCLUDE Subproduct-Price PROCESS --]
[-- INCLUDE Subproduct-AddToCartButton PROCESS --]
[-- INCLUDE Subproduct-ViewCartButton PROCESS --]

/div
[-- ELSE --]
[-- INCLUDE Subproduct-Name PROCESS --]
[-- INCLUDE Product-Price PROCESS --]
[-- INCLUDE Subproduct-AddToCartButton PROCESS --]
[-- INCLUDE Subproduct-ViewCartButton PROCESS --]

[-- END_IF --]

#############################
[-- END_DEFINE SUBPRODUCT --]
#############################



######################
[-- DEFINE PRODUCT --]
######################
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
#[-- VAR.Form no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]

### Start the form for Add to Cart button ###
[-- IF PRODUCT.Subproduct --]
# do nothing
[-- ELSE --]
form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post
[-- END_IF --]

#####################
# GRAPHIC ALIGNMENT #
#####################
[-- INCLUDE Product-GraphicAlign PROCESS --]

####################
# PRODUCT GRAPHIC #
####################
[-- INCLUDE Product-Graphic PROCESS --]

########################
# PRODUCT NAME #
########################
[-- INCLUDE Product-Name PROCESS --]

########################
# PRODUCT SUBPRODUCTS #
########################
[-- IF PRODUCT.Subproduct --]
# Product has subproducts, so just show description for this product
# and then loop through subproducts
[-- INCLUDE Product-Description PROCESS --]

[-- VAR.MoreInfo no --]

[-- LOOP SUBPRODUCTS --]
[-- SUBPRODUCTS --]
[-- END_LOOP SUBPRODUCTS --]

[-- ELSE --]
# Product does not have subproducts

####################
# PRODUCT PRICE #
####################
[-- IF PRODUCT.QuantityPricing --]
#do nothing
[-- ELSE --]
[-- INCLUDE Product-Price-wsgmbh PROCESS --]
[-- END_IF --]

########################
# PRODUCT SKU #
########################
[-- INCLUDE Product-Sku PROCESS --]

########################################
# PRODUCT FIELD1/LIEFERSTATUS #
########################################
[-- INCLUDE Product-Field1-wsgmbh PROCESS --]

########################
# PRODUCT DESCRIPTION #
########################
[-- INCLUDE Product-Description PROCESS --]

#######################
# ADD TO CART BUTTON #
#######################
[-- INCLUDE Product-AddToCartButton-wsgmbh PROCESS --]

# end the IF PRODUCT.subproducts
[-- END_IF --]

###########################
# PRODUCT GRAPHIC #
# align=right, wrap=off #
###########################
[-- INCLUDE Product-GraphicRight PROCESS --]

[-- IF PRODUCT.Subproduct --]
# do nothing
[-- ELSE --]
/form
[-- END_IF --]

[-- END_DEFINE PRODUCT --]



#############################
[-- DEFINE MORE_INFO_PAGE --]
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
#############################
[-- VAR.MoreInfo "yes" --]

[-- IF VAR.MoreInfoTemplate --]
[-- INCLUDE VAR.MoreInfoTemplate PROCESS --]
[-- ELSE --]
[-- INCLUDE Classic-MoreInfoPage-wsgmbh PROCESS --]
[-- END_IF --]

[-- VAR.MoreInfo "" --]
[-- END_DEFINE MORE_INFO_PAGE --]



------------------------------------

This is Classic-MoreInfoPage-wsgmbh:

### Default More Info Page Template ###

html
[-- INCLUDE MoreInfo-Head PROCESS --]
#[-- INCLUDE Classic-MoreInfo.css PROCESS --]
/head

[-- VAR.PageMargins "No" --]

[-- INCLUDE MoreInfo-Body PROCESS --]

[-- IF MORE_INFO.DisplayPageHeader --]
div class="header">[-- HEADER --]</div
[-- END_IF --]

[-- IF PRODUCT.MoreInformationGraphic --]
img [-- PRODUCT.MoreInformationGraphic Remove_HTML --] align="left"
[-- END_IF --]

[-- IF PRODUCT.DisplayName --]
[-- IF PRODUCT.Subproduct --]
h2>[-- PRODUCT.Name --]</h2
[-- ELSE_IF PRODUCT.VariablePrice? --]
[-- IF PRODUCT.VariableName? --]
[-- STORE.ProductName --]: <input type=text name="[--
PRODUCT.RecordNumber --]:name" size="20" maxlength="100" value=""
[-- ELSE --]
h2>[-- PRODUCT.Name --]</h2
[-- END_IF --]
[-- ELSE --]
h2>[-- PRODUCT.Name --]</h2
[-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.QuantityPricing --]
#do nothing
[-- ELSE --]
[-- INCLUDE Product-Price PROCESS --]
[-- END_IF --]


[-- IF PRODUCT.Subproduct --]
# don't display the SKU
[-- ELSE --]
[-- INCLUDE Product-Sku PROCESS --]<br
[-- END_IF --]

########################################
# PRODUCT FIELD1/LIEFERSTATUS #
########################################
[-- INCLUDE Product-Field1-wsgmbh PROCESS --]

br>[-- PRODUCT.MoreInformationText --]

br
[-- IF PRODUCT.Subproduct --]
# Product has subproducts
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]
[-- ELSE --]
# Product does not have subproducts

#######################
# ADD TO CART BUTTON #
#######################
center
[-- INCLUDE Product-AddToCartButton-wsgmbh PROCESS --]

/center

# end the IF PRODUCT.subproducts
[--END_IF--]

br

[-- IF MORE_INFO.DisplayPageFOOTER --]
[-- FOOTER --]
[-- END_IF --]

/body
/html

---------------------
And this is Product-AddToCartButton-wsgmbh:

#######################
# ADD TO CART BUTTON #
#######################
[-- IF PRODUCT.QuantityPricing --]
div class="QPtable"
[-- PRODUCT.QuantityPricing --]
/div
[-- END_IF --]

input type=hidden name=storeid value=[-- STORE_ID --]
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]

[-- IF PRODUCT.DisplayOrderingOptions --]
[-- IF PRODUCT.OptionText --]
br>[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- IF PRODUCT.DisplayOrderingOptions --]
#do nothing
[-- ELSE --]
[-- IF VAR.MoreInfoPage "yes" --]
br
[-- END_IF --]
[-- END_IF --]
[-- Store.Quantity --] <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

[-- IF VAR.AddButtonGraphic --]
input type=image class="add" src="[-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/[-- VAR.AddButtonGraphic --]" name="Add to Cart" alt="Add to
Cart"
[-- ELSE_IF ADDIMAGE? --]
input type=image [--ADDIMAGE--]
[-- ELSE --]
input class="add" type=submit value="[-- ADDTEXT --]"
[-- END_IF --]

----------------------


Regards,

Niko


"Jim" <jstavast@xmission.com> schrieb im Newsbeitrag
news:dcb6cc$kp6$1@eval.shopsite.com...
The section of code that is putting out the "Quantity" is in an include
file called Product-AddToCartButton.
here is the section of code that does it
------------------
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- IF PRODUCT.DisplayOrderingOptions --]
#do nothing
[-- ELSE --]
[-- IF VAR.MoreInfoPage "yes" --]
br
[-- END_IF --]
[-- END_IF --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
---------------------
You could replace the word "Quantity" in the line
Quantity <input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty"
value="1" >&nbsp;&nbsp;

with "Menge" or you could use the tag [-- Store.Quantity --] to pull the
text from the backoffice settings. Note that the text for "Quantity" on
Preferences > Store Text> Shopping cart screen is used in several places
in the store, i.e. the product table in the shopping cart, the quantity
pricing table on store pages and if you implement the above change it
would be used for the product quantity input box on store pages. There
may be different terms you would want to use in some of these places, if
so you would want to hardcode the text in the template.

Jim


jim
 

Re: Product Template in SS 7.1.4 / Translation issue

Postby Nikolaus Gruchot » Wed Aug 03, 2005 4:07 am

Hello Jim,

thank you for poiting me in the right direction.

There are several more VAR tags to be defined and I found that also the
<form> tag in the more information page include was completely missing when
simply copying the shopsite include.

As I do not use any theme, I have simply set [-- VAR.Media media --] so that
the graphics are pulled from the media directory where they are currently
located.

I have the template working now the way I want it.

Now comes the big game to move some of the information currently located in
the product description and the more information text to the customs fields
and assign the new template :-)

I am looking to make my life easier as we have some 1350 products now online
and the way the information for those products is stuffed into only 2 fields
requires me to do to much manual labor when some of the more global
information is changing.

BTW: One of the thingies I will move to one of the custom fields is the
availability icon. This is a small 27x16 pix icon that lets the customer if
the product is in stock. Is there any way to implement it, that this icon
<customfield1> is also shown in the shopping cart, when the customer adds
the article to the cart?

What I would like to show in the cart:

[Buttons] Quantity Productname SKU Customfield1 Price Total

This way the customer has an overview if all article have 24 hrs
availability when placing an order for several articles. He also know that
when adding an article with a 14 day availabilty to other products with 24
hrs availabilty, that the order may take longer to ship. This is the way
amazon Germany is doing it in their cart. I like that I lot, because I can
remove items from the cart that would delay the order or place two orders:
One with the items I need immediately and another with the items that have a
longer shipping time.

Thank you,

Niko

"jim" <jstavast@xmission.com> schrieb im Newsbeitrag
news:dcpgcp$tao$1@eval.shopsite.com...
Niko,
I have verified that when the DefaultCustomProductTemplate is used with
other templates where the VAR.addbuttongraphic is not defined, you will
not get an add button on the more info page. This is the case with the
template you are using. To get around the problem you can add the line
[-- VAR.ADDBUTTONGRAPHIC <your graphic name here> --] to the product
template just after the [-- Define Product --] tag. There is another
slight problem in that the code is looking for the graphic in the
media/themesmedia directory which is the place where the images associated
with the themes are placed. This directory is normally not accessible for
the merchant (at least not through the ShopSite interface) but if you have
access to your server you could put your image in that directory and it
should work (give it the same permission and ownership as other files in
the directory).

The custom templates that ship with ShopSite are designed to work as sets
with certain product templates going with certain page templates and they
may not always work with other templates. They are also quite complex in
nature as they need to take into account the many options that are
available in the page or product. I have found that for most merchants
that complexity is not needed since the merchant know how they are going
to setup their product/page data and how they want it to look on the final
page.

It is often easier to design the page and product layout as you want it
and then create the template to reflect that look rather than to try and
modify one of the supplied templates to fit. I generally also find it
easier to limit the number of include files to just a few, so that it is
easier to see what the whole template is composed of rather than looking
in a dozen or so files.

hope that helps.

Jim

Nikolaus Gruchot
 

Re: Product Template in SS 7.1.4 / Translation issue

Postby Jim » Wed Aug 03, 2005 11:44 am

There is currently no way to include additional product fields in the
product table of the shopping cart.

Jim

Nikolaus Gruchot wrote:
Hello Jim,

thank you for poiting me in the right direction.

There are several more VAR tags to be defined and I found that also the
form> tag in the more information page include was completely missing when
simply copying the shopsite include.

As I do not use any theme, I have simply set [-- VAR.Media media --] so that
the graphics are pulled from the media directory where they are currently
located.

I have the template working now the way I want it.

Now comes the big game to move some of the information currently located in
the product description and the more information text to the customs fields
and assign the new template :-)

I am looking to make my life easier as we have some 1350 products now online
and the way the information for those products is stuffed into only 2 fields
requires me to do to much manual labor when some of the more global
information is changing.

BTW: One of the thingies I will move to one of the custom fields is the
availability icon. This is a small 27x16 pix icon that lets the customer if
the product is in stock. Is there any way to implement it, that this icon
customfield1> is also shown in the shopping cart, when the customer adds
the article to the cart?

What I would like to show in the cart:

[Buttons] Quantity Productname SKU Customfield1 Price Total

This way the customer has an overview if all article have 24 hrs
availability when placing an order for several articles. He also know that
when adding an article with a 14 day availabilty to other products with 24
hrs availabilty, that the order may take longer to ship. This is the way
amazon Germany is doing it in their cart. I like that I lot, because I can
remove items from the cart that would delay the order or place two orders:
One with the items I need immediately and another with the items that have a
longer shipping time.

Thank you,

Niko

"jim" <jstavast@xmission.com> schrieb im Newsbeitrag
news:dcpgcp$tao$1@eval.shopsite.com...

Niko,
I have verified that when the DefaultCustomProductTemplate is used with
other templates where the VAR.addbuttongraphic is not defined, you will
not get an add button on the more info page. This is the case with the
template you are using. To get around the problem you can add the line
[-- VAR.ADDBUTTONGRAPHIC <your graphic name here> --] to the product
template just after the [-- Define Product --] tag. There is another
slight problem in that the code is looking for the graphic in the
media/themesmedia directory which is the place where the images associated
with the themes are placed. This directory is normally not accessible for
the merchant (at least not through the ShopSite interface) but if you have
access to your server you could put your image in that directory and it
should work (give it the same permission and ownership as other files in
the directory).

The custom templates that ship with ShopSite are designed to work as sets
with certain product templates going with certain page templates and they
may not always work with other templates. They are also quite complex in
nature as they need to take into account the many options that are
available in the page or product. I have found that for most merchants
that complexity is not needed since the merchant know how they are going
to setup their product/page data and how they want it to look on the final
page.

It is often easier to design the page and product layout as you want it
and then create the template to reflect that look rather than to try and
modify one of the supplied templates to fit. I generally also find it
easier to limit the number of include files to just a few, so that it is
easier to see what the whole template is composed of rather than looking
in a dozen or so files.

hope that helps.

Jim




Jim
 

Re: Product Template in SS 7.1.4 / Translation issue

Postby Nikolaus Gruchot » Wed Aug 03, 2005 2:18 pm

Hey Jim,

ok. As you are mentioning it, I remember the discussion about adding the
product image to the shopping cart a while ago.

Nevertheless. I will have my product_field1 ready for the time that this
will be possible ;-)

Best regards,

Niko

"Jim" <jstavast@xmission.com> schrieb im Newsbeitrag
news:dcr3bb$jv3$1@eval.shopsite.com...
There is currently no way to include additional product fields in the
product table of the shopping cart.

Jim

Nikolaus Gruchot wrote:
Hello Jim,

thank you for poiting me in the right direction.

There are several more VAR tags to be defined and I found that also the
form> tag in the more information page include was completely missing
when simply copying the shopsite include.

As I do not use any theme, I have simply set [-- VAR.Media media --] so
that the graphics are pulled from the media directory where they are
currently located.

I have the template working now the way I want it.

Now comes the big game to move some of the information currently located
in the product description and the more information text to the customs
fields and assign the new template :-)

I am looking to make my life easier as we have some 1350 products now
online and the way the information for those products is stuffed into
only 2 fields requires me to do to much manual labor when some of the
more global information is changing.

BTW: One of the thingies I will move to one of the custom fields is the
availability icon. This is a small 27x16 pix icon that lets the customer
if the product is in stock. Is there any way to implement it, that this
icon <customfield1> is also shown in the shopping cart, when the customer
adds the article to the cart?

What I would like to show in the cart:

[Buttons] Quantity Productname SKU Customfield1 Price
Total

This way the customer has an overview if all article have 24 hrs
availability when placing an order for several articles. He also know
that when adding an article with a 14 day availabilty to other products
with 24 hrs availabilty, that the order may take longer to ship. This is
the way amazon Germany is doing it in their cart. I like that I lot,
because I can remove items from the cart that would delay the order or
place two orders: One with the items I need immediately and another with
the items that have a longer shipping time.

Thank you,

Niko
Nikolaus Gruchot
 


Return to User Forum

Who is online

Users browsing this forum: No registered users and 38 guests

cron