<ProTOM/>


Ready to help, versatile and powerful. That is ProTOM.
Develop you own theme using HTML, CSS, Javascript & Smarty.

Use smart code fragments, implement your own settings and start developing
unequalled layout themes today.
Get started with ProTom!
But first things first.
 

General

This module enables you to develop a template made-to-measure based on your own HTML, CSS and Javascript. It allows you to leave out traditional themes and widget layouts and develop a unique, conversion upgraded theme. Using this module will help you understand the phrases doctype declaration, semantics and cross browser compability . If you do not know what is meant by these phrases, it might be better to opt for the layout theme Enoza. .

Using your own HTML, CSS and Javascript
By allowing you to use your own HTML, CSS and Javascript you will be responsible yourself for the correct rendering of your webshop. Besides we are giving you a free hand to fit in the elements from the traditional widgets in a position where you want them. This makes you responsible for the correct implementation and functioning of these widgets.

Attention! In order to make sure your webshop will continue to function correctly after each update, it is vital that the content is not adapted by means of CSS and Javascript.

Implementation of webshop logic

Webshop logic? By this expression the technical functioning of ( certain parts of) the webshop is meant. For example the display of a bestseller list.

Webshoplogic can be implemented in various ways:

  • Variables (see tab List of variables).
  • Objects (see tab List of objects).
  • End user settings (see tab End user settings)
  • Multilingual variables (see tab Multilingual support)
  • AJAX widgets (see tab AJAX widgets)

All logic you will be able to use is Smarty-logic. Smarty is the underlying template system this module was built on. You can also consult the Smarty-website documentation for creating foreach-loops, sections and e.g. cycles. Besides you can adapt variable modifiers on variables containing textual content.

Code fragments

As stated, it is possible to implement logic yourself. To simplify this process, a number of code fragments are available. Code fragments can be found on the left in the middle of the module. By clicking on the code fragment, this fragment will be positioned in the code of the file Index.tpl on the spot where your cursor is or was the last time you moved it.

The documentation List of objects specifies for each object in which code fragment a specific object is available and in which variable.

Coding standard

OIn order to help you recognize the type of data your are dealing with in a variable, a certain coding standard was used. All variables have a batch character that specifies the data type of that variable. If you are using the code fragments, you will see that batch characters are also used to inform you which data type is implemented in a certain variable. Below list gives you an overview of the different batch characters and informs you which data type the variable contains.

Batch character Description
_ Logics, adapted for including files.
a Array.
b Boolean.
f Float.
i Integer.
m Mixed, the variable may contain several data types, depending on a result.
o Object.
s String.

Use of prefixes

In order to guarantee the compability with existing webshop logic, CSS-declarations and Javascript functionalities, the use of prefixes for all HTML-elements, CSS-declarations and Javascript functionality is strongly advised. A prefix may consist of any characters or letters you wish, e.g. the abbreviation of your company name combined with a year. This will prevent accidental double declarations. An example: Your company name is “Jansen Jeweler's “ : if you create your theme in 2013, your structure including prefixes may look like this:

<!DOCTYPE>
<html>
<head>
</head>
<body>
<div id="jj2013-header">
<img id="jj2013-logo" src="/logo.jpg"/>
</div>
</body>
</html>

Theme validiation system

This module has an automatic theme validation system. Every time the theme is filed, it is tested first by the validation system. Alterations will only be filed if the validation system does not detect fatal syntax errors. A ny syntax error is reported by the validation system so that the error can be solved. If the validation system does not discover any fatal syntax errors, the alterations will be filed.

As the validation system approaches the webshop invisibly, these tests will be included in your statistics. Each time the template is filed, the validation system will be activated.

Developing themes
Everything within reach, including example code.
 

Javascript functionalities

To keep the code clean, compact and orderly a number of javascript functions were made available. Naturally it is possible to add an extra functionality such as javascript functions and event handlers to Scripts.js or in the file Index.tpl.

EnterPressed()

Function that will check if the key pressed is indeed the “enter” key.

Get(string sDOMId)

Function that will select the value of an input field.

Parameter Datatype Description
sDOMId String The ID of the input field. E.g. <input type="text" id="SearchField" value=""/>

GoTo(string sLocation)

Function that forwards user to location indicated.

Parameter Datatype Description
Location String Location to which user is forwarded.

SubscribeToNewsletter(event)

Signing on a visitor to the newsletter by means of this method is outdated. Use the action hook SubscribeToNewsletter..

CSS declarations

PredefinedButton

To simply add a button in the selected style and colour, a span element with the declaration PredefinedButton should be implemented. This span is automatically converted to a stylized button.

Example
);">shoppingcart</span>

List of variables

Variables are small pieces of code with a specific name ( the variable name) that represent a specific functionality. This functionality may vary from displaying a piece of text to loading the content modules of the webshops. Below you will find the available variables and their description.

Variables that load files

Variable Description
{$_IncludeHead} Include of global head data, Template.css and Scripts.js.
{$_IncludeContent} Include of the contentpage in question (homepage, category, guestbook, productdetails, order route etc. etc.).
{$_IncludeTail} Include of global tail-data, such as measuring pixels and statistics.

Variables in relation to URLS and file locations

Variable Description
{$sProtocol} Gives 'http://' or'https://' back depending on the reserved page.
{$sAbsoluteMediaLocation} Absolute path to the map to which the files were uploaded. HTP or HTPS is automatically specified depending on the reserved page.
{$sRelativeMediaLocation} Relative path to the map to which files were uploaded. This variable is meant for usage in the file Template.css to prevent security conflicts.
{$sCustomerLoginPageDeeplink} Link to the login page.
{$sCustomerLogoutPageDeeplink} Link that provides log-out if customer presses the “log-out” button.
{$sCustomerRegistrationPageDeeplink} Link to the registration page. This link is only available if the choice for the login system is switched on and registration is possible.
{$sCurrentPage} Gives back what type of page is reserved. Based on this several layout pages can be developed. This variable may contain following values:
  • HomePage, the welcome page.
  • TextPage, a textual page.
  • CategoryPage, a category page.
  • ProductPage, the product detail page.
  • NewsPage, the news page.
{$sSearchPageDeeplink} The URL to the search page. This variable should be used to forward your own search functionality to the right page. The search words entered should be added to this variable. The construction of SearchPageDeeplink} consists of {$sProtocol} + website main domain + '/website/index.php?Show=Search&KeyWord='.
{$sBasketPageDeeplink} The URL to the shopping basket. This variable should be used to forward a shopping cart overview developed by yourself to the correct page.
{$HomeFolder} Path to the home folder, used to create image paths.

Settings

Variable Setting
{$bShowPricesToGuests} Setting: Show prices to guests
Location: Starting point/My webshop/Settings/ Loginsystems
Value: true of false.
{$bCustomerLoginActive} Setting: Users Login
Location: Startingpoint/My webshop/ Settings/ Loginsystems
Value: false if 'off', otherwise true.
{$sCustomerLoginSystemType} Setting: Users Login
Location: Startingpoint/My webshop/ Settings/ Loginsystems
Value:
- Inactive, loginsystem is off.
- ActiveWithRegistration, loginsysteem staat aan met de mogelijkheid tot registreren.
- ActiveNoRegistration, loginsysteem is on but no option of registering. Attentention {$sCustomerRegistrationPageDeeplink} does not contain a value.
- ActiveAutomaticRegistration, loginsysteem is on , after placing an order an account is created automatically.
{$sCurrency} Setting: Valuta
Location: Startingpoint/My webshop/Settings/ Order proces settings.
Value:
- USA, American Dollar
- CAD, Canadian Dollar
- DKK, Danish Crowns
- EU, Euro
- UK, English Pound
- RON, Romanian Lei
- SRD, Surinam Dollar
- TL, Turkish Lira
- SEK, Swedish Crown
- CHF, Swiss Franc

Ambient variables

Variable Description
{$sBodyLogic} Adds logic to the <body>-tag for processing the electronic payments . This variable should be used as follows: <body {$sBodyLogic}>.
{$sPageTitleH1} <h1>-tag for the current page. This variable structures the crumb path within the category structure and product detail page.
{$iSelectedCategoryId} Gives back the ID of the selected product category.
{$iSelectedSubCategoryId} Gives back the ID of the selected product subcategory.
{$iSelectedPageId} Gives back the ID of the selected page.
{$sResellerName} Gives back the name of the reseller.
{$sResellerDeeplink} Gives back the link of the reseller's website.
{$sPoweredBy} Gives back the reseller's HTML-code 'Powered by'.
{$bCustomerLoggedIn} Geeft aan met true of false of de klant is ingelogd.
{$sCustomerName} Gives back the customer name of the logged in customer.
{$fCustomerDiscount} Indicates the discount percentage of the customergroup of the customer. This variable only contains a value if the customer in question is in a customergroup.

List of objects

Blog

Objectproperties
Property Description
Title Title of blog item.
Content Textual content of blog item.
ImageDeeplink Link to the image that was added to the blog item.
Deeplink Link to the blog item.
CreateDate Date when blog item was created.
Author Author of blog item.
AuthorWebsiteDeeplink Link to author's website.
CommentCount Number of reactions to blog item.

Available in code fragment
Code fragment Variable Description
Last blogs {$aBlogs} An array of Blog-objects ( last 10).

Decorator\Protom
Diagram

Decorator\Protom\Page

Objectproperties
TypePropertyDescription

\Decorator\Protom\CreditPoint

Objectproperties
TypePropertyDescription
boolean$IsActiveAre the creditpoints active.
boolean$IsVisibleAre the creditpoints visible.
string$NameThe name of the creditpoints.
boolean$IsCustomAre custom creditpoints applied.
int$AmountAmount of creditpoints earned when buying this product.

\Decorator\Protom\Page\Metadata

Objectproperties
TypePropertyDescription
string$KeywordsThe metadata keywords.
string$DescriptionThe metadata description.
string$PageTitleThe metadata page title.
boolean$IsNoIndexIs the page to be indexed.
boolean$IsNoFollowIs a nofollow active on this page.
string$UriThe URI of this page.
string$AliasThe alias of the page.

\Decorator\Protom\Page\Product\Breadcrumb\Crumbs

Objectproperties
TypePropertyDescription
int$IdThe Id of the Crumb.
string$NameThe name of the Crumb.
string$AliasThe Alias of the Crumb.
string$HrefThe url of the crumb.
boolean$FirstCrumbThe first crumb.

\Decorator\Protom\Page\Product\Breadcrumb\CurrentItem

Objectproperties
TypePropertyDescription
string$NameThe Name of the current item.

\Decorator\Protom\Page\Product\Breadcrumb

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the Breadcrumb functionality visible.
\Decorator\Protom\Page\Product\Breadcrumb\Crumbs[]$CrumbsAll the available crumbs.
\Decorator\Protom\Page\Product\Breadcrumb\CurrentItem$CurrentItemThe current breadcrumb item.

\Decorator\Protom\Page\Product\CalculatorSummary

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the summary visible
float$RequestedAmountthe requested amount of the summary
float$Amountthe amount of dhe summary
\Decorator\Protom\Product\Price$PriceThe price object from the summary

\Decorator\Protom\Page\Product\Compare

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the compare functionality visible.

\Decorator\Protom\Page\Product\MostViewed

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the most viewed products visible.
\Decorator\Protom\Product[]$ProductsAn array of Products.

\Decorator\Protom\Page\Product\Question\Email

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the platform visible.
string$NameThe name of the platform.
string$DeeplinkThe link to the platform.

\Decorator\Protom\Page\Product\Question\SocialMedia

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the platform visible.
string$PlatformThe Socialmedia platform.
string$AccountNameThe Platform account name.
string$DeeplinkThe link to the socialmedia platform.

\Decorator\Protom\Page\Product\Question\SocialMediaCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Page\Product\Question\SocialMedia[]$SocialMediaA Socialmedia object.

\Decorator\Protom\Page\Product\Question\Telephone

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the platform visible.
string$NameThe name of the platform.
string$DeeplinkThe Link to the Platform.

\Decorator\Protom\Page\Product\Question\WhatsApp

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs platform visible
string$Name Name of Platform
string$DeeplinkThe link of WhatsApp

\Decorator\Protom\Page\Product\Question

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the question block visible.
string$ImageThe possible attached image.
\Decorator\Protom\Page\Product\Question\SocialMediaCollection$SocialMediaThe question linked social media data.
\Decorator\Protom\Page\Product\Question\Email$EmailThe question email object.
\Decorator\Protom\Page\Product\Question\Telephone$TelephoneThe question telephone object.
\Decorator\Protom\Page\Product\Question\WhatsApp$WhatsAppThe question whatsapp object.

\Decorator\Protom\Page\Product\Review\Field

Objectproperties
TypePropertyDescription
string$NameThe name of the field.
string$FieldNameThe systemname of the field.
string$TypeThe field type either score, textarea or text.
boolean$RequiredIs the field required yes or no.

\Decorator\Protom\Page\Product\Review

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the reviews visible.
boolean$IsPostingAllowedIs posting of reviews allowed.
boolean$IsApprovalEnabledIs an approval of posted reviews needed.
boolean$IsNameRequiredIs a name required.
string$ApprovalTextThe given approval text upon sending a review.
\Decorator\Protom\Page\Product\Review\Field[]$FieldsAn array of form fields.
int$ItemsPerPageThe amount of items per page.
\Decorator\Protom\CreditPoint$CreditPointA creditpoint object.

\Decorator\Protom\Page\Product\Template\EndUserSetting

Objectproperties
TypePropertyDescription
string$ValueThe value of this enduserSetting

\Decorator\Protom\Page\Product\Template\EndUserSettingCollection

Objectproperties
TypePropertyDescription
boolean$IsActiveAre there any enduser settings active for this product.
\Decorator\Protom\Page\Product\Template\EndUserSetting[]$SettingsThe enduser settings.

\Decorator\Protom\Page\Product\Template

Objectproperties
TypePropertyDescription
string$NameThe given template name.
string$PathThe given template path.
boolean$IsProtomIs the template a protom template.
boolean$HasCustomBreadcrumbIf the template has a custom breadcrumb the global breadcrumb will be hidden.
\Decorator\Protom\Page\Product\Template\EndUserSettingCollection$EndUserSettingCollection of end user settings.
string$NameThe given template name.
string$PathThe given template path.
boolean$IsProtomIs the template a protom template.
boolean$HasCustomBreadcrumbIf the template has a custom breadcrumb the global breadcrumb will be hidden.
\Decorator\Protom\Page\Product\Template\EndUserSettingCollection$EndUserSettingCollection of end user settings.

\Decorator\Protom\Page\Product\ViewedByOthers

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre viewed by others products visible.
\Decorator\Protom\Product[]$ProductsAn array of Products.

\Decorator\Protom\Page\Product\ViewedRecently

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the recently viewed products visible.
\Decorator\Protom\Product[]$ProductsAn array of Products.

\Decorator\Protom\Page\Product\Wishlist\Button

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the button visible.
string$CaptionThe caption of the button.
\Decorator\Protom\Page\Product\Wishlist\Icon$IconThe icon of the button.

\Decorator\Protom\Page\Product\Wishlist\Icon

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the icon visible.
string$IconThe HTML string of the icon.

\Decorator\Protom\Page\Product\Wishlist

Objectproperties
TypePropertyDescription
int$IdId of the Wishlist
string$Namename of the Wishlist

\Decorator\Protom\Page\Product\WishlistCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the wishlist collection visible.
\Decorator\Protom\Page\Product\Wishlist\Button$ButtonThe button of the wishlist.
\Decorator\Protom\Page\Product\Wishlist[]$WishlistsAn array of wishlists.

\Decorator\Protom\Page\Product

Objectproperties
TypePropertyDescription
string$TitleThe page title
\Decorator\Protom\Page\Product\Template$TemplateThe template to use
\Decorator\Protom\Page\Metadata$Metadataof the page
\Decorator\Protom\Page\Product\Review$ReviewReview settings of the page
\Decorator\Protom\Product$ProductThe Currently viewed product of the product page
\Decorator\Protom\Page\Product\Question$QuestionThe question settings
\Decorator\Protom\Page\Product\ViewedRecently$ViewedRecentlyRecently viewed products
\Decorator\Protom\Page\Product\ViewedByOthers$ViewedByOthersProduct viewed by others
\Decorator\Protom\Page\Product\MostViewed$MostViewedMost viewed products
\Decorator\Protom\Page\Product\Compare$CompareCompare setting
\Decorator\Protom\Page\Product\Breadcrumb$BreadcrumbThe breadcrumb
\Decorator\Protom\Page\Product\WishlistCollection$CustomerWishlistThe wishlist
\Decorator\Protom\Page\Product\CalculatorSummary$CalculatorSummaryThe calculation summary of the set
string$TitleThe page title
\Decorator\Protom\Page\Product\Template$TemplateThe template to use
\Decorator\Protom\Page\Metadata$Metadataof the page
\Decorator\Protom\Page\Product\Review$ReviewReview settings of the page
\Decorator\Protom\Product$ProductThe Currently viewed product of the product page
\Decorator\Protom\Page\Product\Question$QuestionThe question settings
\Decorator\Protom\Page\Product\ViewedRecently$ViewedRecentlyRecently viewed products
\Decorator\Protom\Page\Product\ViewedByOthers$ViewedByOthersProduct viewed by others
\Decorator\Protom\Page\Product\MostViewed$MostViewedMost viewed products
\Decorator\Protom\Page\Product\Compare$CompareCompare setting
\Decorator\Protom\Page\Product\Breadcrumb$BreadcrumbThe breadcrumb
\Decorator\Protom\Page\Product\WishlistCollection$CustomerWishlistThe wishlist
\Decorator\Protom\Page\Product\CalculatorSummary$CalculatorSummaryThe calculation summary of the set

\Decorator\Protom\Page\Takeout\Checker

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the takeout checker visible.
boolean$IsValidIs the takeout checker valid.
string$CountryThe chosen country to check.
\Decorator\Protom\Page\Takeout\Checkout$CheckoutThe checkout data.
string$ZipcodeThe given zipcode to check.
\Decorator\Protom\Page\Takeout\Date$DateThe given date.
\Decorator\Protom\Page\Takeout\Slot$SlotThe reserved slot.
\Decorator\Protom\Page\Takeout\Message$MessageA given message.
array$CheckoutsAn array of checkout types.

\Decorator\Protom\Page\Takeout\Checkout

Objectproperties
TypePropertyDescription
string$TypeThe checkout type.
string$TitleThe checkout Title.
boolean$IsAvailableIs the checkout available.
array$DatesAn array of the available dates.

\Decorator\Protom\Page\Takeout\Date

Objectproperties
TypePropertyDescription
DateTime$DateA DateTime formatted date.
int$AvailableCapacityThe available capacity.
int$CapacityThe current capacity.
array$SlotsAn array of slots.

\Decorator\Protom\Page\Takeout\Message

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the takout message visible.
string$MessageThe takout message.

\Decorator\Protom\Page\Takeout\Slot

Objectproperties
TypePropertyDescription
int$IdThe takout slot id.
DateTime$DateThe Date formatted in datetime.
int$AvailableCapacityThe available capacity.
int$CapacityThe current capacity.

\Decorator\Protom\Page\Takeout

Objectproperties
TypePropertyDescription
boolean$IsVisible

\Decorator\Protom\Page

Objectproperties
TypePropertyDescription

Amount

Objectproperties
TypePropertyDescription
int$PrecisionThe number of digits behind the seperator.
float$MinimalOrderAmountThe minimal amount which has to be ordered.
float$StepThe step which you can increase / decrease the amount.
double$AmountThe amount of how many the customer wants.
boolean$IsFixedAre there fixed amounts.
boolean$IsVisibleIs the exact number visible.
\Decorator\Protom\Product\Amount[]$FixedAmountsArray of fixed amounts.

Attachment

Objectproperties
TypePropertyDescription
int$IdThe id of the attachment.
string$LanguageLanguage of the attachment.
string$PathPath to the attachment.
string$NameName of the attachment.
string$PositionThe sorting position.
string$SizeThe File size.
string$IconThe File Icon of the file.

AttachmentCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre product attachments visible.
\Decorator\Protom\Product\Attachment[]$AttachmentsAn array of attachments.

Attribute\Combination

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\Attribute[]$Attributesarray of attributes
\Decorator\Protom\Product\Attribute\Combination$Combinationattribute combination

Attribute\CombinationCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\AttributeCombination[]$Combinationsarray of combinations

Attribute\Option

Objectproperties
TypePropertyDescription
int$IdThe id of the option.
string$OptionThe option name.
int$TypeType of this option, either dropdown or input.
\Decorator\Protom\Product\Attribute[]$AttributesAn array of attributes.
boolean$IsVisibleIs the option visible.
boolean$IsRequiredIs the option required.

Attribute\OptionCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\Attribute\Option[]$OptionsAn array of options.

Attribute\SelectedCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\Attribute[]$AttributesAn array of attributes.
boolean$AreRequiredAttributesSelectedAre all required attributes selected.
int$CombinationIdThe attribute combination id.

Attribute

Objectproperties
TypePropertyDescription
int$IdThe id of the attribute.
string$OptionThe option name of an attribute.
string$ValueThe value name of an attribute.
string$UnitThe unit of an attribute.
\Decorator\Protom\Product\Price$PriceThe price object of an attribute.
boolean$IsSelectedIs the attribute selected.
boolean$IsVisibleIs the attribute visible.

AttributeCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the attributes visible?
\Decorator\Protom\Product\Attribute\SelectedCollection$SelectedSelected attributes
\Decorator\Protom\Product\Attribute\OptionCollection$OptionCollection of options
boolean$HasRequiredAttributeHas this colection required attributes (no text fields)

AttributeCombination\Product

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\Attribute\SelectedCollection$SelectedSelected attributes
\Decorator\Protom\Product$ProductProduct

AttributeCombination

Objectproperties
TypePropertyDescription
int$Idid of the combination
int$ProductIdid of the product
int$CombinationIdid of the combination
string$AttributeThe combination of attribute values
\Decorator\Protom\Product\AttributeCombination\Product$ProductProduct of the attributecombination
boolean$IsVisibleIs the attribute combination visible

AttributeCombinationCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product$Combinationsavailable attribute combinations

Bundle\Product

Objectproperties
TypePropertyDescription
boolean$IsFreeIs Free
boolean$HasAttributeHas attributes
\Decorator\Protom\Product\Attribute\SelectedCollection$SelectedSelected attributes
\Decorator\Protom\Product$ProductProduct

Bundle

Objectproperties
TypePropertyDescription
int$IdThe id of this bundle.
boolean$IsRecommendedIs the bundle recomended yes or no.
boolean$HasVariablePriceDoes the bundle have a fixed price or a price based on the products included (variable).
string$NameName of the bundle.
string$DescriptionThe description of the bundle, only available if it is a recommended bundle.
\Decorator\Protom\Product\Price$PricePrice of the bundle.
\Decorator\Protom\Product\Bundle\Product[]$ProductsAn array of BundleProducts.
string$UriThe URI of this product.
string$AliasThe alias of the product.
\Decorator\Protom\Product\Button$ButtonThe order button of this bundle.
string$LinkDescriptionThe description of the bundle (all product names).

BundleCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the product bundles visible.
string$DiscountTextPossible discount text of the product bundle.
\Decorator\Protom\Product\Bundle[]$BundlesAn array of bundles.

Button\Basket

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the button visible.
boolean$IsActiveIs the button active.
string$CaptionCaption of the button.
string$HookDefines the js hook of this button.

Button\Quotation

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the button visible.
boolean$IsActiveIs the button active.
string$CaptionCaption of the button.
string$HookDefines the js hook of this button.

Button

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the button visible.
boolean$IsActiveIs the button active.
string$CaptionCaption of the button.
string$HookDefines the js hook of this button.

Calculator\Dimension\Area

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the Dimension data visible
boolean$IsActiveIs the Dimension data active
string$TypeThe Type of the Calculator
string$WidthThe Width of the Calculator
string$LengthThe Length of the Calculator

Calculator\Dimension

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the Dimension data visible
boolean$IsActiveIs the Dimension data active
string$TypeThe Type of the Calculator

Calculator

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the Calculator visible.
boolean$IsActiveIs the Calculator active.
string$NameThe name of the Calculator.
string$TypeThe type of the Calculator.
string$CalculationMethodThe CalculationMethod of the Calculator.
\Decorator\PRotom\Product\Calculator\Dimension$DimensionThe given calculator Dimensions.
string$UnitThe Unit of the Calculator.
double$MarginThe margin of the Calculator.
boolean$IsMarginVisibleIs the margin visible of the Calculator.
boolean$IsMarginEditableIs the margin editable in the Calculator.
string$HookDefines the js hook of this button.

CategoryCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\ProductCategory[]$CategoriesAn array of categories.
boolean$IsVisibleInCategoriesIs this product visible in categories.
string$PathThe path of the product.

Color

Objectproperties
TypePropertyDescription
boolean$IsEmptyIs the color visible.
string$ClassThe css class of the color.
string$StyleThe css style of the color.
string$HexThe color in HEX.
string$NameThe name of the Color.
boolean$IsDarkIs it a dark color.

CreditPoint

Objectproperties
TypePropertyDescription
boolean$IsActiveAre the creditpoints active.
boolean$IsVisibleAre the creditpoints visible.
string$NameThe name of the creditpoints.
boolean$IsCustomAre custom creditpoints applied.
int$AmountAmount of creditpoints earned when buying this product.

Deposit

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the deposits visible.
\Decorator\Protom\Product\Price$ContainerPrice of the container deposit.
\Decorator\Protom\Product\Price$SafetyPrice of the safety deposit.

EndUserSetting

Objectproperties
TypePropertyDescription
string$ValueThe value of this enduserSetting

EndUserSettingCollection

Objectproperties
TypePropertyDescription
boolean$IsActiveAre there any end user settings active for this product.
\Decorator\Protom\Product\EndUserSetting[]$SettingsThe end user settings.

Keyword

Objectproperties
TypePropertyDescription
string$KeywordA given keyword.
string$DeeplinkThe deeplink to the keyword page.

KeywordCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the keywords visible.
\Decorator\Protom\Product\Keyword[]$KeywordsAn array of keywords.

Option\Price

Objectproperties
TypePropertyDescription
double$OriginalPriceThe original price of the product.
string$OriginalPrice_FormatThe original price formatted.
string$OriginalPrice_FormatWithCurrencyThe original price formatted with currency.
double$OriginalPrice_IncThe price inc. VAT.
string$OriginalPrice_Inc_FormatThe price inc. VAT formatted.
string$OriginalPrice_Inc_FormatWithCurrencyThe price inc. VAT formatted with currency.
double$OriginalPrice_ExcThe price exc. VAT.
string$OriginalPrice_Exc_FormatThe price exc. VAT formatted.
string$OriginalPrice_Exc_FormatWithCurrencyThe price exc. VAT formatted with currency.
string$CurrencyThe currency of the price.
double$DiscountThe price discount amount.
int$DiscountPercentageThe discount in percentages.
double$Discount_IncThe discount inc. VAT.
string$Discount_Inc_FormatThe discount inc. VAT formatted.
string$Discount_Inc_FormatWithCurrencyThe discount inc. VAT formatted with currency.
double$Discount_ExcThe discount exc. VAT.
string$Discount_Exc_FormatThe discount exc. VAT formatted.
string$Discount_Exc_FormatWithCurrencyThe discount exc. VAT formatted with currency.
double$SellPriceThe sellprice based on the webshop settings this is either inc. or exc. VAT.
string$SellPrice_FormatThe sellprice formatted.
string$SellPrice_FormatWithCurrencyThe sellprice formatted with currency.
double$SellPrice_IncThe sellprice inc. VAT.
string$SellPrice_Inc_FormatThe sellprice inc. VAT formatted.
string$SellPrice_Inc_FormatWithCurrencyThe sellprice inc. VAT formatted with currency.
double$SellPrice_ExcThe sellprice exc. VAT.
string$SellPrice_Exc_FormatThe sellprice exc. VAT formatted.
string$SellPrice_Exc_FormatWithCurrencyThe sellprice exc. VAT formatted with currency.
double$AmountThe smount of products the customer wants.
boolean$IsVisibleIs the price visible.
double$VatrateThe VAT rate.
string$NotVisibleCaptionWhen the price is not visible display why.
string$OperatorOperator, either + or -, depending on the price.

Package

Objectproperties
TypePropertyDescription
int$IdThe id of the package.
string$NameThe name of the package (isn't translated).
boolean$IsVisibleIs the package visible.

Photo

Objectproperties
TypePropertyDescription
int$IdThe id of the photo.
string$PathThe dynamic path of the photo.
string$AltThe alt text of the photo.
int$PositionThe position of the photo.

PhotoCollection

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\Photo[]$PhotosAn array of photo's.
\Decorator\Protom\Product\Photo$MainPhotoThe main photo.

Decorator\Protom\Product\Price

Objectproperties
TypePropertyDescription
double$PriceThe original price of the product.
string$Price_FormatThe original price of the product formatted.
string$Price_FormatWithCurrencyThe original price of the product formatted with currency.
double$Price_ExcThe original exc. VAT price of the product.
string$Price_Exc_FormatThe original exc. VAT price of the product formatted.
string$Price_Exc_FormatWithCurrencyThe original exc. VAT price of the product formatted with currency.
double$Price_IncThe original inc. VAT price of the product.
string$Price_Inc_FormatThe original inc. VAT price of the product formatted.
string$Price_Inc_FormatWithCurrencyThe original inc. VAT price of the product formatted with currency.
double$OriginalPriceThe original price of the product with attributes.
string$OriginalPrice_FormatThe original price with attributes formatted.
string$OriginalPrice_FormatWithCurrencyThe original price with attributes formatted with currency.
double$OriginalPrice_IncThe price with attributes inc. VAT.
string$OriginalPrice_Inc_FormatThe price with attributes inc. VAT formatted.
string$OriginalPrice_Inc_FormatWithCurrencyThe price with attributes inc. VAT formatted with currency.
double$OriginalPrice_ExcThe price with attributes exc. VAT.
string$OriginalPrice_Exc_FormatThe price with attributes exc. VAT formatted.
string$OriginalPrice_Exc_FormatWithCurrencyThe price with attributes exc. VAT formatted with currency.
string$CurrencyThe currency of the price.
double$DiscountThe price discount amount.
int$DiscountPercentageThe discount in percentages.
double$Discount_IncThe discount inc. VAT.
string$Discount_Inc_FormatThe discount inc. VAT formatted.
string$Discount_Inc_FormatWithCurrencyThe discount inc. VAT formatted with currency.
double$Discount_ExcThe discount exc. VAT.
string$Discount_Exc_FormatThe discount exc. VAT formatted.
string$Discount_Exc_FormatWithCurrencyThe discount exc. VAT formatted with currency.
double$SellPriceThe sellprice based on the webshop settings this is either inc. or exc. VAT.
string$SellPrice_FormatThe sellprice formatted.
string$SellPrice_FormatWithCurrencyThe sellprice formatted with currency.
double$SellPrice_IncThe sellprice inc. VAT.
string$SellPrice_Inc_FormatThe sellprice inc. VAT formatted.
string$SellPrice_Inc_FormatWithCurrencyThe sellprice inc. VAT formatted with currency.
double$SellPrice_ExcThe sellprice exc. VAT.
string$SellPrice_Exc_FormatThe sellprice exc. VAT formatted.
string$SellPrice_Exc_FormatWithCurrencyThe sellprice exc. VAT formatted with currency.
double$AmountThe smount of products the customer wants.
boolean$IsVisibleIs the price visible.
double$VatrateThe VAT rate.
string$NotVisibleCaptionWhen the price is not visible display why.

ProCon

Objectproperties
TypePropertyDescription
int$IdThe id of the pro or con.
\DateTime$CreateDateThe create date of this pro or con.
string$TypeThe type, either pro or con.
string$ValueThe value of this pro or con.
string$IconThe icon of this pro or con.

ProConCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the pro's and con's visible.
\Decorator\Protom\Product\ProCon[]$ProConsAn array of pro's and con's.

ProductCategory\DescriptionPhoto

Objectproperties
TypePropertyDescription
int$IdThe id of the photo.
string$PathThe dynamic path of the photo.
string$AltThe alt text of the photo.
int$PositionThe position of the photo.
string$LocationLocation of the photo
boolean$IsVisibleIs the photo visible

ProductCategory\EndUserSetting

Objectproperties
TypePropertyDescription
string$ValueThe value of this endusersetting.

ProductCategory\EndUserSettingCollection

Objectproperties
TypePropertyDescription
boolean$IsActiveAre there any end user settings active for this product.
\Decorator\Protom\Product\ProductCategory\EndUserSetting[]$SettingsThe end user settings.

ProductCategory

Objectproperties
TypePropertyDescription
string$IdThe id of the Category.
int$ParentThe id of the parent category.
string$NameThe name of the category.
string$DescriptionThe dscription of the category.
\Decorator\Protom\Product\ProductCategory\DescriptionPhoto$DescriptionPhotoThe Description photo.
Photo$PhotoThe category photo.
\Decorator\Protom\Product\ProductCategory\EndUserSettingCollection$EndUserSettingCollection of end user settings.

Property\FeaturedCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleare featured properties visible
\Decorator\Protom\Product\Property[]$PropertiesArray of featured properties

Property

Objectproperties
TypePropertyDescription
int$Idid of property
string$Namename of property
string$DescriptionDescription of the property
string$ValueValue of the property
string$Iconoptional icon
string$TypeType of the property
bool$IsTextIs the type of the property text.
bool$IsOptionIs the type of the property option.
bool$IsOptionCheckboxIs the type of the property optioncheckbox.
bool$IsCheckboxIs the type of the property checkbox.
bool$IsGroupIs the type of the property group.
bool$IsCollapsedGroupIs the type of the property collapsedgroup.
bool$IsTextAreaIs the type of the property textarea.
bool$IsPriceIs the type of the property price.

PropertyGroup

Objectproperties
TypePropertyDescription
int$IdThe id of the property group.
string$NameThe name of the property group.
\Decorator\Protom\Product\Property[]$PropertiesAn array of properties.

PropertyGroupCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre the properties visible.
\Decorator\Protom\Product\Property\FeaturedCollection$FeaturedCollection of properties.
\Decorator\Protom\Product\PropertyGroup[]$GroupsAn array of property groups.
\Decorator\Protom\Product\Property[]$PropertiesAn array of properties.

RelevantProductCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre relevant products visible.
\Decorator\Protom\Product[]$ProductsAn array of products.

Review

Objectproperties
TypePropertyDescription
int$IdThe id of the review.
string$ReviewThe review text.
int$PointsThe number of given points.
\DateTime$DateCreatedThe review create date.
string$NameThe name of the reviewer.
boolean$ApprovedIs the review approved.
int$UserIdId of a possible logged in user that placed the review.

ReviewCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre reviews visible.
int$CountThe number of reviews.
int$ScoreThe average score of the given reviews.
\Decorator\Protom\Product\Review[]$ReviewsArray of reviews.
string$ErrorPossible error message.

Shipping\Delivery

Objectproperties
TypePropertyDescription
string$MessageThe delivery message.
boolean$LowOnStockMessageThe delivery message shown when the product is low on stock.
boolean$IsVisibleIs the delivery message visible.
string$ColorThe color of the delivery message if available.
string$LabelThe info text of the delivery.
string$LowOnStockLabelThe info text of the delivery when it is low on stock.
int$DaysThe amount of days in which the product is delivered.

Shipping

Objectproperties
TypePropertyDescription
\Decorator\Protom\Product\Price$PriceThe shipping price.
string$DeeplinkDetailsLink to the details of this shipping.
\Decorator\Protom\Product\Shipping\Delivery$DeliveryThe delivery information.
string$BasedOnSetting of on which, either fixed or weight, a price is based.

StaggeredPrice

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre staggered prices visible.
boolean$IsActiveAre staggered prices active.
\Decorator\Protom\Product\Price[]$PricesAn array of prices.
\Decorator\Protom\Product\Price$SelectedWhich price is selected.

Stock\Warning

Objectproperties
TypePropertyDescription
string$MessageWarning message of Stock
boolean$IsVisibleIs the warning message visible

Stock

Objectproperties
TypePropertyDescription
boolean$IsEnabledIs stock enabled.
boolean$IsVisibleIs stock number visible.
int$AmountWhat is the amount of stock.
string$TypeStock based on product or attribute.
string$DisplayTypeDisplay level as icons or text.
string$LevelEither high, medium, or low stock level.
string$IconSetThe icon set to use.
\Decorator\Protom\Product\Stock\Warning$WarningWarning when product is not available based on stock.

Upload\File

Objectproperties
TypePropertyDescription
string$FilenameThe original filename.
string$TempnameThe filename on the server.
string$DeeplinkThe deeplink to the path.
string$IconThe deeplink to the icon.

Upload

Objectproperties
TypePropertyDescription
int$IdThe id of the upload.
string$DescriptionThe description of the upload.
boolean$IsRequiredIs this upload required.
string$PositionThe sorting position of the upload.
\Decorator\Protom\Product\Upload\File$FileThe file object.

UploadCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleAre product attachments visible.
\Decorator\Protom\Product\Upload[]$UploadsAn Array of uploads.

Variation\Product

Objectproperties
TypePropertyDescription
boolean$UseColorUse color
\Decorator\Protom\Product\Color$ColorColor object
\Decorator\Protom\Product\Photo$PhotoPhoto object
\Decorator\Protom\Product$ProductProduct

VariationCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the variation collection visible.
boolean$UseColorUse color or images as icons.
\Decorator\Protom\Product[]$VariationsArray of different variations.

Video\Adapter\Unknown

Objectproperties
TypePropertyDescription

Video\Adapter\Vimeo

Objectproperties
TypePropertyDescription

Video\Adapter\YouTube

Objectproperties
TypePropertyDescription

Video\Adapter

Objectproperties
TypePropertyDescription

Video

Objectproperties
TypePropertyDescription
int$IdThe id of the video.
string$NameThe name of the video.
int$PositionThe sorting position of the video.
string$VideoLinkThe link of the video.

VideoCollection

Objectproperties
TypePropertyDescription
boolean$IsVisibleIs the collection of videos visible.
\Decorator\Protom\Product\Video[]$VideosAn array of video's.

\Decorator\Protom\Product

Objectproperties
TypePropertyDescription
int$IdThe Id of the product.
int$WebsiteIdThe Id of the website.
string$NameThe Product name.
string$ProductNumberThe product article number.
string$EANThe product EAN.
string$MPNThe product MPN.
string$SKUThe product SKU.
string$ShortDescriptionThe short description of a product.
string$DescriptionThe full description of a product.
string$UnitThe Unity of product.
boolean$OrderWithoutStockCan this product be ordered without stock.
string$WeightThe weight of the product.
string$MemoThe product Memo.
string$SpecsThe product specification link.
\DateTime$CreateDateThe create date of this product.
\DateTime$LastModifiedThe last Modified date of this product.
string$BrandThe brand of this product.
string$SupplierThe supplier of this product.
string$ConditionThe condition of this product.
\Decorator\Protom\Product\KeywordCollection$KeywordA collection of keywords linked to this product.
\Decorator\Protom\Product\PropertyGroupCollection$PropertyA collection of properties linked to this product.
\Decorator\Protom\Product\RelevantProductCollection$RelevantProductA collection of relevant products linked to this product.
\Decorator\Protom\Product\Price$PriceThe price object of this product.
\Decorator\Protom\Product\PhotoCollection$PhotoA collection of photo's linked to this product.
\Decorator\Protom\Product\StaggeredPrice$StaggeredPriceA collection of prices linked to this product.
\Decorator\Protom\Product\AttachmentCollection$AttachmentA collection of attachments linked to this product.
\Decorator\Protom\Product\UploadCollection$UploadA collection of uploads linked to this product.
\Decorator\Protom\Product\VideoCollection$VideoA collection of video's linked to this product.
\Decorator\Protom\Product\ReviewCollection$ReviewA collection of reviews linked to this product.
\Decorator\Protom\Product\BundleCollection$BundleA collection of product bundels linked to this product.
\Decorator\Protom\Product\CreditPoint$CreditPointThe Creditpoint information.
\Decorator\Protom\Product\VariationCollection$VariationA collection of Variation linked to this product.
\Decorator\Protom\Product\ProConCollection$ProConA collection of Pro's and con's linked to this product.
\Decorator\Protom\Product\AttributeCollection$AttributeA collection of Attributes linked to this product.
\Decorator\Protom\Product\AttributeCombinationCollection$AttributeCombinationA collection of Attribute combinations linked to this product.
\Decorator\Protom\Product\Button$ButtonThe button of this product.
\Decorator\Protom\Product\Amount$AmountThe Amount information.
boolean$IsActiveIs the product active.
\Decorator\Protom\Product\Color$ColorColor information of this product.
boolean$IsVisibleIs this product visible.
\Decorator\Protom\Product\CategoryCollection$CategoryA collection of categories linked to this product.
\Decorator\Protom\Product\Shipping$ShippingThe Shipping information.
\Decorator\Protom\Product\Stock$StockThe Stock information.
\Decorator\Protom\Product\Deposit$DepositThe Deposit information.
string$UriThe URI of this product.
string$AliasThe alias of the product.
\Decorator\Protom\Product\EndUserSettingCollection$EndUserSettingA collection of end user settings linked to this product.
\Decorator\Protom\Product\Calculator$CalculatorThe product calculator.
boolean$IsOnWishlistIs The Product On a wishlist.
boolean$IsDigitalIs The Product a Digital product.
\Decorator\Protom\Product\Package$PackageIs the object that contains package information.

Products

Available in code fragment
Code fragment Variable Description
Fetch products {foreach \Factory\Protom\Products::Fetch([]) as $Product} {/foreach} Fetch an array of products based on the arguments in supplied as parameter. The parameters are combined (no intersection), "product" are added in "products" and are added in products in categorie (categorie). The sorted result array contains DisplayedProduct objects, not to confuse with Products.
Available parameters
Parameter Description
Category One category id
Categories Array of category ids. Please suplly the sub category id's also.
Product One product id
Products Array of product ids.

The example below outputs the product name of products with the ids 1,2,3 and every product in category 8. {foreach \Factory\Protom\Products::Fetch([
'products' => [1,2],
'product' => 3,
'category' => 8]) as $oProduct}
{$oProduct->Name} <br />
{/foreach}

{\Factory\Protom\Products::Fetch(['product' => 392717250])->current()->Name}
The example below fetches products with the ids, 1 and 2. {foreach \Factory\Protom\Products::Fetch([
'products' => [1],
'product' => 2
]) as $oProduct}
{$oProduct->Name} <br />
{/foreach}

Brand

Objectproperties
Property Description
Name Brand name.

Available in code fragment
Codefragment Variable Description
List of brands {$aBrands} An array of Brand-objects.

Crumb

Objectproperties
Property Description
Title Title of category or page.
Deeplink Deeplink to the category or page in question. Value of the last crumb is empty.

Available in code fragment
Codefragment Variable Description
Crumb path {$aCrumbs} An array of Crumb-objects.

Language

Objectproperties
Property Description
FlagIcon Deeplink to the standard flag icon, to be used in <img /> .
Code Country code, two digits (ISO 3166-1).
Domain Domain of the language.

Available in code fragment
Codefragment Variable Description
Language flags {$aLanguages} An array of Language-objects.

NewsItem

Objectproperties
Property Description
Title Title of newsitem.
Content Content of newsitem.
Date Date of precessing.
Deeplink Link to news item.

Available in code fragment
Codefragment Variable Description
List of newsitems {$aNewsItems} An array of NewsItem-objects.

OrderRow

Objectproperties
Property Description
ProductNumber Product number/Article number.
ProductName Name of products.
Count Number of products. E.g. 2 if two identical products are in the shopping cart.
Tax VAT-value as integer. E.g. 0,6 or 21.
Unit Product unit.
Price Selling price (if a discount is applicable, it is deducted ) Examples values: 10, 10.1 and 10.95.
FromPrice The original price (if discount is applicable is will differ from Price) Example values: 10, 10.1 en 10.95.
Discount Discount on a product (if applicable) . Value contains discountvalue. Example values: 10, 10.1 en 10.95.
TotalPrice Total price of this product (Count * Price). Example values: 10, 10.1 en 10.95.
PriceFormatted Formatted selling price (if a discount is applicable is is deducted). Example values: 10,00, 10,10 en 10,95.
FromPriceFormatted Formatted original price (if a discount is applicable it differs from Price ). Example values: 10,00, 10,10 en 10,95.
DiscountFormatted Formatted discount on a product (if applicable). Example values: 10,00, 10,10 en 10,95.
TotalPriceFormatted Formatted total price of this product (Count * Price). Example values: 10,00, 10,10 en 10,95.
Deeplink Deeplink to product detail page.
MainImageDeeplink Deeplink to main image of product.
MainImageThumbnailDeeplink Deeplink to thumbnail of main image of product.

Available in code fragment
Codefragment Variable Description
Small shopping basket {$aOrderRows} An array of OrderRow-objects.

Page

Objectproperties
Property Description
Id Unique page ID.
Title Page title (also used as link name).
PageType Page type of the page. Optional page types:
  • HomePage
  • About
  • AgreementTerms
  • BannerPage
  • Calendar
  • ContactPage
  • DownloadPage
  • EnumeratePage
  • FAQPage
  • GuestbookReview
  • HomePage
  • LinkPage
  • MailingList
  • MailingPage
  • NewHomePage
  • NewsPage
  • PageBlog
  • Poll
  • PresentationPage
  • PriceListPage
  • RedirectPage
  • ReservePage
  • RoutePage
  • ShowMailings
  • StandardPage
  • UserAccount
Deeplink Link to linked page.

Available in code fragment
Codefragment Variable Description
Pages {$aPages} An array of Page-objects.

Product

Objectproperties
Property Description
ProductName Name of product.
ProductNumber Productnumber/article number.
ShortDescription Short description (max. 200 characters).
Description Full description.
Unit Unity of product.
Tax VAT-value as integer. E.g. 0, 6 of 21.
Stock Current stock.
StockDeliveryStandard Standard delivery time for the product
BrandId Product brand
Weight Current weight of product
Specs Specification URL
Attributes Product attributes
EANNumber EAN Number
MPNNumber MPN Number
Price Selling price (if a discount is applicable, it is deducted). Example values: 10, 10.1 en 10.95.
FromPrice Original price (if discount is applicable it will differ from Price. Example values: 10, 10.1 en 10.95
Discount Discount on a product (if applicable). Value contains discount value. Example values: 10, 10.1 en 10.95.
PriceFormatted Formatted selling price (if a discount is applicable, it is deducted). Example values: 10,00, 10,10 en 10,95.
FromPriceFormatted Formatted original price (if discount is applicable it differs from Price). Example values: 10,00, 10,10 en 10,95.
DiscountFormatted Formatted discount on a product (if applicable). Example values: 10,00, 10,10 en 10,95
Deeplink Deeplink to product page.
MainImageDeeplink Deeplink to main image of product.

As standard a measurement of 500px wide with matching space. The platform offers a render farm that allows you to scale to any measure you desire. This may make quite a difference in bandwidth. To scale an mage ( and automatically saving it, following code is used:

{$oProduct->MainImageDeeplink|replace:'/Large':'/150'}.

Using this code that normally was served as 500 px width – the image will be served as an image of 150px width. If the image of 150px width did not exist as yet, it is automatically created. Images cannot be made larger than the orginal uploaded file.
MainImageThumbnailDeeplink Deeplink to the thumbnail of the main image of the product.
ImageDeeplink Deeplink to all the images of product.

As standard a measurement of 500px wide with matching space. The platform offers a render farm that allows you to scale to any measure you desire. This may make quite a difference in bandwidth. To scale an mage ( and automatically saving it, following code is used:

{$oProduct->ImageDeeplink|replace:'/Large':'/150'}.

Using this code that normally was served as 500 px width – the image will be served as an image of 150px width. If the image of 150px width did not exist as yet, it is automatically created. Images cannot be made larger than the orginal uploaded file.
ImageThumbnailDeeplink Deeplink to the thumbnail of all the images of the product.
CreateDate Y-m-d H:i:s Date when product was created.
OrderButtonType Type of button that was advised in product management:
- OrderButton, orderbutton (consult hook_AddProductToCart for implementation documentation).
- OfferButton, offerbutton
- NoButton, no button
ShowOrderButton true of false
ReviewsTotal Product reviews available
ReviewsAverage Average review rating
ReviewsMin Min. rating available string '0'
ReviewsMax Max. rating available string '5'

Determine true of false for property ShowOrderButton
The property ShowOrderButton contains the value true or false depending on several combinations of settings and product properties. Factors that should be taken into account are:

Setting Location
Show prices to guest Starting point/My webshop/Settings/General/Login systems
Hide orderbutton if no more stock is available Starting point / My webshop / Settings / Orderprocess and stock / Stockmanagement / Stock options
Product has stock Starting point / My products/Product management / product in question/Tab Stock
Stocktype Starting point / My products / Product management / Product in question / Tab Stock
Stock Starting point / My products / Product management / Product in question / Tab stock
Show order / offer button at product Starting point / My products / Productmanagement / Product in question / Tab Options

The propertyShowOrderButton is only true for following combinations:
  1. Show prices to guests [=Yes]and also
    Hide orderbutton if no stock is available[=checked]and also
    Product has stock [=Yes] and also
    Stock is [=Bigger than 0] and also
    Show order/offerbutton with product[=Orderbutton]
  2. Show prices to guests[=Yes]and also
    Hide orderbutton if no stock is available [=Unchecked]and also
    Show order/offerbutton with product[=Orderbutton]
  3. Show prices to guests[=Yes] and also
    Product has stock [=Unchecked] and also
    Show order/offerbutton with product[=Orderbutton]
  4. Show prices to guests[=Yes] and also
    Product type [=Attribute] and also
    Show order/offerbutton with product [=Orderbutton]
  5. Show prices to guests [=No] and also
    Customer logged in [=No] and also
    Hide order button if there is no stock available [=Checked] and also
    Product has stock [=Checked] and also
    Stock [=Bigger than 0] and also
    Show order/offerbutton with product[=Orderbutton]
  6. Show prices to guests [=No] and also
    Customer logged in [=Yes] and also
    Hide orderbutton if no stock is available [=Unchecked]and also
    Show order/offer button with product [=Orderbutton]
  7. Show prices to guests [=No] and also
    Customer logged in [=Yes] and also
    Product has stock [=Unchecked] and also
    Show order/offer button with product [=Orderbutton]
  8. Show prices to guests [=No] and also
    Customer logged in [=Ja] and also
    Stocktype [=Attribute] and also
    Show order/offer button with product [=Orderbutton]

Available in code fragment
Codefragment Variable Description
BestSellers {$aBestSellers} An array of Product-object maximum 25.
Product on offer {$oSpecialOffer} A Product-object
Example product category image {$aProductCategoryProducts} An array of Product-objects. This code fragment is available in the filesProductCategory1.sub.tpl, ProductCategory2.sub.tpl, ProductCategory3.sub.tpl and ProductCategory4.sub.tpl and be used as layout for category pages and certain elements on the modular page.

ProductCategory

Within the platform, product categories can be used in several places , however, it depends on the location what object properties a ProductCategory-object has. ProductCategory-objects are available in following places:

  • - Index.tpl
  • - ProductCategory1.sub.tpl
  • - ProductCategory2.sub.tpl
  • - ProductCategory3.sub.tpl
  • - ProductCategory4.sub.tpl
  • - SubCategory1.sub.tpl
  • - SubCategory2.sub.tpl

ProductCategory in Index.tpl

ProductCategory-objects in the file Index.tpl are usually used to build the navigation structure within the theme. In below tables the object properties are named and it is mentioned in which code fragments these object properties are available.

Objectproperties
Property Description
Id Unique ID of product category.
ParentId ID of upper category.
Name Name of category.
Description Description of category
ShowOrderButton true of false.This attribute may be used to determine if an order button should be shown or not. This depends on the setting chosen for the category in question in the catalogue module.
ApplyPhotoEnlargement true of false.This attribute may be used to determine if a large picture should be shown or not. This depends on the setting chosen for the category in question in the catalogue module.
ApplyPhotoCanvas true of false.This attribute may be used to determine if a canvas image shoud be used or not. This depends on the setting chosen for the category in question in the catalogue module.
ProductsPerPage Number of products that is shown per page within the category in question. This depends on the setting chosen for the category in question in the catalogue module.
Deeplink Link to the product category page.
SubCategories An array of ProductCategory-objects, within the main category if the main category contains sub categories.
With in a sub categorie is possible to loop the sub categories again. This can up to three deep.

Available in code fragment
Codefragment Variable Description
Catalogue (with subcategories) {$aCategories} An array of ProductCategory- objects.
Catalogue (without subcategories) {$aCategories} An array of ProductCategory- objects.

ProductCategory in ProductCategory(1|2|3|4).sub.tpl

ProductCategory-objects within the files ProductCategory1.sub.tpl, ProductCategory2.sub.tpl, ProductCategory3.sub.tpl and productCategory4.sub.tpl are used to give supplementary information within a product category description. In below tables the object properties are mentioned as well as the code fragments in which the object properties are available.

Object properties
Property Description
Id Unique ID of product category.
ProductCount Total number of products in the product category.
CurrentSubPage Currently active subpage.
ProductsPerPage The number of products that can be displayed for each page.
ShowOrderButton true of false. This attribute can be used to determine if an order button should be shown or not. This depends on the chosen setting for the category in question in the catalogue module.
ApplyPhotoEnlargement true of false. This attribute can be used to determine if a large picture should be shown or not. This depends on the setting chosen for the category in question in the catalogue module.
ApplyPhotoCanvas true of false. This attribute can be used to determine if a canvas image should be used or not. This depends on the setting chosen for the category in question in the catalogue module.

Available in code fragment
Codefragment Variable Description
Example product category image {$oProductCategory} A Productcategory-object.

ProductCategory in SubCategory(1|2).sub.tpl

ProductCategory-objects in the files SubCategory1.sub.tpl and SubCategory2.sub.tpl are used to show the subcategories within a product category image. In below tables the object properties are named. and also in which code fragments these object properties are available.

Objectproperties
Property Description
Id Unique ID of product category.
Name Name of subcategory.
Description Description of subcategory.
ShowOrderButton true of false. This attribute can be used to determine if an order button should be shown or not. This depends on the chosen setting for the category in question in the catalogue module true of false.
ApplyPhotoEnlargement true of false. This attribute can be used to determine if a large picture should be shown or not. This depends on the setting chosen for the category in question in the catalogue module.
ApplyPhotoCanvas true of false. This attribute can be used to determine if a canvas image should be used or not. This depends on the setting chosen for the category in question in the catalogue module.
Deeplink Link to the product category page.
MainImageDeeplink Link to the image of the product category.

Beschikbaar in codefragment
Codefragment Variable Description
Example subcategories within category {$aProductCategorySubCategories} An array of ProductCategory-objects.

RSSFeed

Object properties
Property Description
Name Name of feed:
  • Latest product.
  • Most popular offers.
  • Latest news.
Deeplink Link to RSS feed in question.

Available in codefragement
Codefragment Variable Description
List of RSS feeds {$aRSSFeeds} An array of RSSFeed-objects

SocialMediaAccount

Object properties
Property Description
Platform Name of platform:
  • Facebook.
  • Google.
  • Instagram.
  • LinkedIN.
  • Pinterest.
  • Twitter.
  • Youtube.
AccountName Accountnaam on platform
Deeplink Link to account in question.
HasIcon Does it have a custom icon.
Icon The custom svg wrapped around an <i> tag in a string.

Available in codefragment
Codefragment Variable Description
Social Media Accounts {$aSocialMediaAccounts} An array van SocialMediaAccount-objects.

End user settings

If you develop a theme for an end user who does not have any knowledge of web development, you can add end user settings to your theme. The end user can manage those settings trough input field in the settings of the template. Every user settings is part of a category, A minimum of one end user category setting should be created to be able to create end user settings. These

In order to create structure, end user settings should be distinguished into categories. Categories are divided into three types namely: Template, Product and Category. The type define where those user settings are displayed and where the end user is able to enter their value. For categories with the type `tempalte` each category is represented as a separate tab for the end user, where for each tab/category the settings created for the end user can be represented. Examples of categories may be: “General”, “Colours”, Main page” etc.

Category Types

There are three category types, namely: Template, Product and Category. Those types represent where the end user settings are displayed. Categories with the type `Template` are displayed in the settings of the template. Categories with the type `Product`, and with the type `Category` are displayed in the category. The last two categories are a bit different then the `Template` type. Only settings of the active template are displayed on every product and category. Each value entered in the end user settings at a product or category are linked/ saved at the product/ category. And unlike the template type different end user categories are not displayed in multiple tabs but in different cards (this is a because the limited horizontal screen size). When you copy a product the end user setting value is also copied, when you delete an end user setting, the value is also deleted.

An end user setting

Inputfield Description
Label Label of the setting. This is the naming of the setting in the dialogue window for the end user.
Variable name Name of the variable the value can be read out with. The chosen variable name should be unique for each separate theme. In order to print the value of a variable the entering {$oEndUserSetting->VariableName} is used, 'VariableName' being the chosen variable name. The variable name may exclusively contain alfa numeric characters.
Type
  • Text, an input field for a text line.
  • Tekstbox, a text field.
  • Tekstbox with layout and textfield provided with layout options.
  • Menu, a selection box containing a minimum of two choices. As many choices a desired may be added.
  • Upload field for an image. The end user may select and upload a file.
  • Colour option box, a field that allows the end user to select a colour by using a colour palette.
  • Numeric value, an input field for a numeric value.
Standard value The standard value for the setting if end user has not selected a a value.

Implementing an end user setting.

The end user settings that were created are shown in the item “Code fragments” as a special item. By clicking an end user setting it is placed in the active editor. If the work field layout “Theme file as well as separate CSS window” is used, this means that the implementation code is placed in the editor for theme file or CSS file. The end user settings may be used in the theme files Index.tpl, ProductLayouts, ProductCategories, Template.css and Scrtipts.js.

Implementing Product and Category end user settings. When you edit the index.tpl the system does not know which product you are viewing therefore you need too tell it. You can do that with the exampled below where $iProductId and $iCategory id is the corresponding id.

Display product variable on the Index.tpl: {\Protom\EndUserSetting::Product($iProductId)->variable_name}
Display category variable on the Index.tpl: {\Protom\EndUserSetting::Category($iCategoryId)->variable_name}

On the other hand on the product page you can use the following examples to retreive end user settings, for more information see EndUserSettingCollection:


Display product variable on the ProductLayout: {$Product->EndUserSetting->Settings["variable_name"]}
{* or with some magic you are able too get like so *}
{$Product->EndUserSetting->variable_name}

Display category variables on the ProductLayout: {$Product->Category->Categories[0]->EndUserSetting->Settings["variable_name"]} {* Where 0 is the first category *}
{* or with some magic you are able too get like so *}
{$Product->Category->Categories[0]->EndUserSetting->variable_name}

Display template variable on the ProductLayout: {$Page->Template->EndUserSetting->Settings["variable_name"]}
{* or with some magic you are able too get like so *}
{$Page->Template->EndUserSetting->variable_name}

When you use the "magic" way (`->EndUserSetting->variable_name`) you can not use the variable names "IsActive" or "Settings", those are reserved. Use EndUserSetting->Settings["IsActive"] instead.

There no such thing for the Category page.. yet

Multilingual support

If your webshop uses multilingual spport you may want to include multiligual variables in the theme you develop. E.g. a shoppingcart image you developed yourself. You may wish to show “Shopping basket”, but to your English visitors you may like to show “Shoppingcart”. Following documentation and examples will teach you how to realise this.

If you do not specify a translation for a certain language ( read following syntax-structure) , and the webshop is represented in that language, the translation you specified first will be shown automatically. It makes no difference in which order the translations are placed.

Each text you wish to present multilangually, should get a multilingual definition.
The syntax of such a definition consists of a number of elements:

Syntax structure

Syntax Description
{* ml This indicates that a multilingual translation will start. Attention: spacing at the end is obligatory!.
sPlaceHolderName Name of the variable that is defined.
:nl[Vertaling]
:en[Translation]
:de[Uebersetzung]
:fr[Traduction]
:tr[Çeviri]
Here the translation is given for each language. A language starts with a semicolon followed by the language code. The translation per language is represented by square brackets.
/ml *} This indicates the end of a multilingual translation.

Available languages

Language code Language
nl Dutch.
en English.
de German.
fr French.
tr Turkish.

Examples

Extensive notation: {* ml
  sHelloWorld
    :nl[Hallo wereld]
    :en[Hello world]
    :de[Hallo Welt]
    :fr[Bonjour monde]
/ml *}
My multilingual variable: {$sHelloWorld}

Shortened notation: {* ml sHelloWorld:nl[Hallo wereld]:en[Hello world]:de[Hallo Welt]:fr[Bonjour monde]/ml *}
My shortened notation multilingual variable: {$sHelloWorld}

No translation for every language:
Note: In this example the active language of the webshop is Dutch, the English language will be shown. {* ml
  sHelloWorld
    :en[Hello world]
    :de[Hallo Welt]
/ml *}
My multilingual variable: {$sHelloWorld}

AJAX widgets

AJAX Widgets are widgets that can contain a certain content and can be restored “below water” (showing formatting and styles) without the page the visitor is on at that moment having to be loaded again. AJAX stands for Asynchronous Javascript And XML meaning that the data will be retrieved asynchronously from the webserver. This is a technique that allows you to make pages interactive without having to restore a whole page. Below is described how to recognize and apply an AJAX Widget, followed by the description of AJAX Widgets available.

Syntax structure

Syntax Description
{* plugin *} This indicates the start of an AJAX Widget.
<div id=""> The div in which the AJAX Widget-code is placed. The ID of the div should be a valid AJAX Widget-name (see available AJAX Widgets). If no valid ID is specified and the syntax is correct, the theme is filed but there is no callback-function in the webshop that will trigger this AJAX Widget.
</div> The closing tag of the div in which the AJAZX widget-code is placed.
{* /plugin *} This indicates that an AJAX Widget ends.

Example: {* plugin *}
  <div id="SmallBasket">
    // Widget code
  </div>
{* /plugin *}

Available AJEX widgets

Following AJAX Widgets are available:

  • Shopping basket

Shopping basket

The shopping basket is a typical example of anAJAX Widget. It is often an item that you wish to present clean-cut, well-organized and well-considered. A shopping basket as AJAX Widget is very user friendly because the option “Show dialogue window shopping cart”( My webshop/Settings/Orderproces and stock/Order proces settings) is available. The shopping basket information is automatically updated as soon as a visitor places a product in the shopping basket, without the page reloading again.


Basic code {* plugin *}
  <div id="SmallBasket">
  
  </div>
{* /plugin *}
Available variables within this widget
Variable Content and data type of variable
{$aOrderRows} An array of OrderRow-objects (see 'List of objects')

Example: {* plugin *}
  <div id="SmallBasket">
    {if $aOrderRows|@count eq 0}
      {* ml
        sBasketLine
          :nl[Er zijn nog geen producten in uw winkelmand geplaatst.]
          :en[There are no products in your shopping cart yet.]
          :de[Es gibt keine Produkte in Ihrem Warenkorb.]
          :fr[Il n'y a aucun produit dans votre panier pour le moment.]
      /ml *}
      {$sBasketLine}
    {else}
              
      <table cellpadding="0" cellspacing="0" width="100%">
        {$fTotal = 0}
        {foreach from=$aOrderRows item=oOrderRow}
          {$fTotal = $fTotal + $oOrderRow->TotalPrice}
          <tr>
            <td style="width:30px; text-align:center;">{$oOrderRow->Count}</td>
            <td style="width:15px;"> × </td>
            <td>{$oOrderRow->ProductName|middle_truncate:50:3}</td>
            <td style="width:15px; text-align:center;"> {$sCurrency} </td>
            <td style="width:50px; text-align:right;">{$oOrderRow->PriceFormatted}</td>
          </tr>
        {/foreach}
        <tr>
          <td colspan="3"></td>
          <td style="width:15px; text-align:center;"> {$sCurrency} </td>
          <td style="width:50px; text-align:right;">{$fTotal|number_format:'2':',':'.'}</td>
        </tr>
      </table>
              
      {* ml
        sPayButton
          :nl[Afrekenen]
          :en[Checkout]
          :de[Abrechnen]
          :fr[Régler]
      /ml *}
      <input type="button" value="{$sPayButton}" onclick="window.location = '{$sBasketPageDeeplink}';"/>
              
    {/if}
  </div>
{* /plugin *}

Action Hooks

Action Hooks are the link between your Pro-Tom design and the internal functionality of the webshop platform. Action Hooks are marked out because they are hooked via the class-attribute.

hook_AddProductToCart

Adds a product to the visitor's shopping basket.

Conditional functioning based on settings.
Settings “Functioning order button & shoppingcart'
Location Startingpoint / My webshop / Settings / Order proces settings
Behaviour based on value
  • To shopping cart-page - visitor is forwarded to the shopping basket page.
  • Show dialogue window shopping cart - visitor remains on current page and is shown a dialogue window showing the added product including quantity.

Data-attributes
Attribute Obligatory Description
data-product-id Yes Unique product id (Product::Id)
data-quantity No Quantity ordered. The action hook only accepts an integer-value, all other values are converted to '1'.

Example
<span class="hook_AddProductToCart PredefinedButton" data-product-id="123">
  Bestellen
</span>

Example with order quantity input field
<script type="text/javascript">
  $(document).ready(function() {
    $('.change-quantity').keyup(function() {
      // Controleren op een integer-invoerwaarde, anders de waarde 1 toekennen
      var iNewQuantity = Math.floor($(this).val()) == $(this).val() && $.isNumeric($(this).val())
        ? $(this).val()
        : 1;
        
      $(this)
        .parent()
        .find('.hook_AddProductToCart')
        .attr(
          'data-quantity',
          iNewQuantity
        );
    });
  });
</script>
<div>
  <input type="text" class="change-quantity" value="1"/>
  <span class="hook_AddProductToCart PredefinedButton" data-product-id="123" data-quantity="1">
    Bestellen
  </span>
</div>

hook__global__product-order

Adds a product to the visitor's shopping basket.

Conditional functioning based on settings.
Settings “Functioning order button & shoppingcart'
Location Startingpoint / My webshop / Settings / Order proces settings
Behaviour based on value
  • To shopping cart-page - visitor is forwarded to the shopping basket page.
  • Show dialogue window shopping cart - visitor remains on current page and is shown a dialogue window showing the added product including quantity.

Data-attributes
Attribute Obligatory Description
data-product-id Yes Unique product id (Product::Id)

form requirements
input name Obligatory Description
product_amount No Input field for the amount of products you would like to order.
product_attribute{$Option->Id} No Input field used for each of the product attributes. it is essential to use the {$Option->Id} within the name for this to work correctly.
product_upload No Input field for uploading a file, like an image that needs to be printed onto the product.
Button hook No The button hook can be used instead of defining the hook manually, but this can only be done while using the factory products implementation.

Callbacks (ajaxRequest)

Callbacks can be used to fetch the result of the hook action.

Callback Type Description
doOrder Callback function name. This is the callback function name used for obtaining the original call's result.
onSuccess Succes Adding the product to the basket was succesfull.
onError Error Adding the product to the basket didn't happen due to any errors.

Callback content

The content of any returned callback.

Name Type Description
product_id (number), the product id. The product id can be used to target a specific error or success class on the page.
messages Array of messages. Result messages of a callback.
message: attributecombinations attributecombinations Result message, attributecombination error defined as name: attributecombinations
message: amount amount Result message, amount error, like minimal amount not reached, defined as name: amount
message: stock stock Result message, stock error, like product is out of stock, defined as name: stock

Example of the button (manual)
<span class="hook__global__product-order PredefinedButton" data-product-id="123">
  Bestellen
</span>

Example of the button (using the factory products)
<a class="cs-button cs-button--primary product__button--order {$Product->Button->Hook}" data-product-id="{$Product->Id}" tabindex="0">{$Product->Button->Caption}</a>
Example with a form, including a quantity input field.

<div>
  <form name='form-product'>
    <input type="text" name="product_amount" class="change-quantity" value="1"/>
    <span class="hook__global__product-order PredefinedButton" data-product-id="123">
      Bestellen
    </span>
  </form>
</div>

Example with a form, including a quantity input field and some attribute combination fields.

<div>
  <form name='form-product'>
    {foreach $Product->Attribute->Option->Options as $Option}
      {if $Option->Type == 2 || $Option->Type == 3}
        <div class="product__attribute product__attribute--input">
          <label>{$Option->Option} {if $Option->IsRequired}*{/if}</label>
          <input type="text" name="product_attribute[{$Option->Id}]" value="{$Option->Attributes[0]->Value}">
        </div>
      {else}
      <div class="product__attribute product__attribute--select">
        <label>{$Option->Option} {if $Option->IsRequired}*{/if}</label>
        <select name="product_attribute[{$Option->Id}]">
          {foreach $Option->Attributes as $Attribute}
            <option value="{$Attribute->Id}"
              {if $Attribute->IsSelected}selected="selected"{/if}>
              {$Attribute->Value}
            </option>
          {/foreach}
        </select>
      </div>
      {/if}
    {/foreach}

    <input type="text" name="product_amount" class="change-quantity" value="1"/>
    <span class="hook__global__product-order PredefinedButton" data-product-id="123">
      Bestellen
    </span>
  </form>
</div>

Example of using callbacks.

$(document).ready(function() {
ajaxRequest.doOrder({
onError: function(data) {
$.each(data.messages, function (index, message) {
$('.error__' + data.product_id + '__' + message.toLowerCase()).show();
});
}
});
});

  <div class="error-messages error__{$Product->Id}__attributecombinations" style="display:none;"> Attribute combination error!</div>
  <div class="error-messages error__{$Product->Id}__amount" style="display:none;"> The minimal order amount is not reached!</div>
  <div class="error-messages error__{$Product->Id}__stock" style="display:none;"> This product is currently not in stock!</div>
  

hook_SubscribeToNewsletter

Sign on a visitor for the newsletter on the mailing list “Logged on via website”. In input-elements the action hook will check if enter was pressed and will try to sign on the visitor. The action hook reacts on click-events on all other element types. A succesful log on ensues if a name and valid email address have been entered.

Attention: the implementation code should be nested in an element with the id NewsMailRegistration, otherwise the action hook logic required will not be loaded!

DOM-elements
Element Obligatory Description
input#NewsEmailEmail Yes Mail address of the subschriber.
input#NewsEmailName No Name of subscriber.
input#NewsEmailBName No Company name of subscriber.

Result shown
Element Description
#NewsLetterEmailError Is filled with the result of the logon:
- You were succesfully signed on for the newsletter
- This email address was added to the list
- This is an invalid email address

Example
<div id="NewsMailRegistration">
  <div id="NewsLetterEmailError"></div>
  <input type="text" id="NewsMailName" class="hook_SubscribeToNewsletter" placeholder="Uw naam"/><br/>
  <input type="text" id="NewsMailEmail" class="hook_SubscribeToNewsletter" placeholder="Uw e-mailadres"/><br/>
  <a href="#" class="hook_SubscribeToNewsletter PredefinedButton">
    Aanmelden
  </span>
</div>

Product Page

You can customize the entire product page, from rearrage to delete or add content, even put confetti on your order button when pressed. Here I will describe how you do all of this. There are a couple of things you need to know before you start. The available variabels, hooks, placeholders an javascript objects. Lets start with the variabels.

Variables

In ProductLayout1.tpl and ProductLayout2.tpl are 2 variabels available, namely $Page and $Product

Type Property Description
string $Title The page title
\Decorator\Protom\Page\Product $Page The current product page
\Decorator\Protom\Page\Product\Template $Template The template to use
\Decorator\Protom\Page\Metadata $Metadata of the page
\Decorator\Protom\Page\Product\Review $Review Review settings of the page
\Decorator\Protom\Product $Product The Currently viewed product of the product page
\Decorator\Protom\Page\Product\Question $Question The question settings
\Decorator\Protom\Page\Product\ViewedRecently $ViewedRecently Recently viewed products
\Decorator\Protom\Page\Product\ViewedByOthers $ViewedByOthers Product viewed by others
\Decorator\Protom\Page\Product\MostViewed $MostViewed Most viewed products
\Decorator\Protom\Page\Product\Compare $Compare Compare setting
\Decorator\Protom\Page\Product\Breadcrumb $Breadcrumb The breadcrumb
\Decorator\Protom\Page\Product\WishlistCollection $CustomerWishlist The wishlist
\Decorator\Protom\Page\Product\CalculatorSummary $CalculatorSummary The calculation summary of the set

Placeholders

Place holders are classes where pieces of content will be loaded when hooks or ajaxrequests are triggered. When not implemented the page will not be dynamic. The functions and placeholders have a link based on their name. For example the content of "function ProductPhoto" will be loaded in element with the class "page__product__photo". It is possible to use the same placeholder multiple times.

Function Placeholder
ProductShortDescription page__product__short-description
ProductReview page__product__review
ProductStock page__product__stock
ProductPrice page__product__price
ProductStaggeredPrice page__product__staggered-price
ProductVariation page__product__variation
ProductAttribute page__product__attribute
ProductAmount page__product__amount
ProductCreditpoint page__product__creditpoint
ProductButton page__product__button
Wishlist page__wishlist
Compare page__compare
ProductMainPhoto page__product__main-photo
ProductDescription page__product__description
ProductProCon page__product__pro-con
ProductKeyword page__product__keyword
ProductProperty page__product__property
ViewedRecently page__viewed-recently
ProductRelevant page__product__relevant
ViewedByOthers page__viewed-by-others
MostViewed page__most-viewed
ProductBundle page__product__bundle
ProductVideo page__product__video
ProductUpload page__product__upload
ProductAttachment page__product__attachment
ProductImage page__product__image
ProductPhoto page__product__photo
Breadcrumb page__breadcrumb
ProductReviewSummary page__product__review-summary
Question page__question
ProductDeposit page__product__deposit
ProductVariations page__product__variations
ProductAttributes page__product__attributes
WishList page__wish-list
ProductInformation page__product__information
ProductProcon page__product__procon
ProductCreditPoint page__product__credit-point

Ajax request

Ajax request performs actions and update placeholders with the current data. You as a developer can catch the success and error events of those ajax requests. Or load placeholders with ajax instead on page load to increase performance.

Action Description
ajaxRequest.load The "functions" function will be loaded with ajax and place in the correspondending placeholder, see example below
ajaxRequest.doOrder Adds the current $Product to the basket
ajaxRequest.doAmountChange Performs an amount change
ajaxRequest.doAttributeChange Perfomrs an attribute change
ajaxRequest.doAddReview Adds an review to the product
ajaxRequest.doAskAQuestion Sends an Ask A Question email with the .form-ask-a-question contents
ajaxRequest.doProductUpload Uploads a file to the $Product
ajaxRequest.doQuotation Add the current $Product to the quoation

Example #1

Loads functions in their places on document ready


$(document).ready(function () {
ajaxRequest.load({
functions: ['ViewedRecently', 'ProductRelevant', 'MostViewed', 'ViewedByOthers', 'ProductBundle'],
onSuccess: function () {
InitViewedRecently();
InitProductRelevant();
InitMostViewed();
InitViewedByOthers();
},
});
});

Example #2

Puts confetti on your screen when order button is pressed.


{if $Page->Template->IsProtom}
<script src="https://protom.ccvshop.nl/assets/confetti.js/confetti.min.js"></script>
{/if}
<script>
$(document).ready(function () {
ajaxRequest.doOrder({
onSuccess: function () {
confetti.start()
},
});
});
</script>

Cookies

According to the GDPR a guest must accept which cookies they are allowing to be set, we differentiate 3 types of cookies; 'functional','statistic' and 'marketing'. When a cookie is set `CookiePolice` will check if the type of the cookie matches the preference. If not, the cookie is denied. To make your life easier, a Cookie class is available to set and remove cookies.

<script>
let exdate = new Date();
exdate.setDate(exdate.getDate() + 365);

Cookie.set('SetAccordion', 1, {
expires: exdate,
type: Cookiepolice.type.functional
});


Cookie.remove('SetAccordion');
</script>

Cookies

Which cookies are depending on apps and implementations of third parties. Below is a list of cookie we (can) set.

Type Name Description
Functional PHPSESSID Here the session id will be stored
Functional cookie_preference Stores the cookie preference
Functional CCVPAY_TERMINAL_INFO When using an physical pin terminal, the id of that terminal will be stored in here
Functional ml_Language Stores the selected language
Statistics shop-visit-uuid An unique id for statistical purposes
Functional csrf-token A csrf token

Cookie hooks

When a guests sets their cookie preference in the cookie bar, you as an developer can hook onto that action by implementing doSetCookiePreference

<script>

ajaxRequest.doSetCookiePreference({
onSuccess: function() {

console.log("success");
}
});
</script>

Use of cookie hooks in your own form

You're also able to develop your very own cookiebar. This can all be done by implementing your very own form. The form will need the call to action hook: hook_UpdateCookiePreferences to work. The eventual response can be obtained by using the earlier named doSetCookiePreference function.

<div class="CookieBar">
  <div>
    <div>Some text.</div>
    <div>
      <form name="form__cookie-preference" id="form__cookie-preference">
        <li><input type="checkbox" name="cookies[]" id="preference__necessary" value="functional" checked="checked" disabled /><label for="preference__necessary">Functional</label></li>
        <li><input type="checkbox" name="cookies[]" id="preference__statistic" value="statistic" /><label for="preference__statistic">Statistics</label></li>
        <li><input type="checkbox" name="cookies[]" id="preference__marketing" value="marketing" /><label for="preference__marketing">Marketing</label></li>
      
        <span>
          <a>
           <span class="hook_UpdateCookiePreferences">Accept selected cookies</span>
          </a>
       </span>
      </form>
    </div>
  </div>
</div>

CookiePolice

When a cookie is set `CookiePolice` will check if the type of the cookie matches the preference. If not, the cookie is denied. This is done by adding the type as a cookie flag

<script>
let exdate = new Date();
exdate.setDate(exdate.getDate() + 365);

document.cookie = "old=skool;expires: exdate;type=marketing";
</script>

Or by adding it too the `Cookie.Add` functions

<script>
Cookie.set('name', 'value', {
expires: exdate,
type: Cookiepolice.type.marketing
});

</script>

When removing, no type is needed.

<script>
Cookie.remove('name');
</script>

Custom cookie bar

A custom cookie bar is possible, as long as you set the right cookie preferences one way or the other, the name of the cookie is `cookie_preference` and the value is a coma seperated value of the type of cookie types. Where `cookie_preference` will always be present.

<script>
let exdate = new Date();
exdate.setDate(exdate.getDate() + 365);

Cookie.set('cookie_preference', 'functional,statistic,marketing', {
expires: exdate,
type: Cookiepolice.type.functional
});
</script>

Hooks

Hooks are class on buttons/links that perform an actions. The mostly do Ajax requests to change a property of the page/product object

Hook Description
hook__product-upload--delete Hook to delete an upload, will trigger ajax request: doUpload
hook__product-upload Hook to do an upload, will trigger ajax request: doUpload
hook__product-amount--minus Hook to change amount with minus 1, will trigger ajax request: doAmountChange
hook__product-amount--plus Hook to change amount with plus 1, will trigger ajax request: doAmountChange
hook__product-amount Hook to change amount with the value of [name=product_amount], will trigger ajax request: doAmountChange
hook__product-attribute Hook to change the selected attributes defined in [name=product_attribute] , will trigger ajax request: doAttributeChange
hook__product-order Hook to order the current $Product on the products page
hook__product-add-review Hook to add an review with the content of .form-add-review, will trigger ajax request doAddReview
hook__product-ask-a-question Hook to send an asked question with the content of .form-ask-a-question, will trigger ajax request doAskAQuestion
hook__bundle-order Hook to order the complete bundle defined by attribute data-bundle-id
hook__bundle-attribute-dialog Hook to open a dialog for selecting attributes for the bundle with attribute data-bundle-id
hook__product-quotation hook to add product to a quotation
Examples
Een paar voorbeelden om je op weg te helpen!
 

Deviating start page

Using below code it is easy to create a deviating start page. <!DOCTYPE html>
<html>
  <head>
    {$_IncludeHead}
  </head>
  <body {$sBodyLogic}>    
    {if $sCurrentPage == 'HomePage'}
      // Homepage opmaak
      {$_IncludeContent}
    {else}
      // Andere pagina opmaak
      {$_IncludeContent}
    {/if}
    {$_IncludeTail}
  </body>
</html>

Bestseller styles

Using the code below it is easy to style your own bestsellers. Have a look at the object documentation of the Product-object to see every possible property. <!DOCTYPE html>
<html>
  <head>
    {$_IncludeHead}
    <style type="text/css">
      ol {
        list-style:none;
        margin:0;
        padding:0;}
      
      ol li {
        display:block;
        float:left;
        margin-right:10px;}
        
      .bestseller {
        border:1px solid #ccc;
        padding:10px;
        background:#ededed;}
      
      .bestseller img {
        width:200px;
        padding-bottom:5px;
        margin-bottom:5px;
        border-bottom:1px solid #ccc;}
      
      .bestseller a {
        display:block;
        padding:8px;
        background:#2ecc71;
        text-decoration:none;
        color:#fff;
        font-weight:bold;}
      
      .bestseller a:hover {
        background:#27ae60;}
    </style>
  </head>
  <body {$sBodyLogic}>    
    ...
    
    <ol>
    {section loop=$aBestSellers name=i max=25}
      {$oBestSeller = $aBestSellers[i]}
      <li>
        <div class="bestseller">
          <img src="{$oBestSeller->MainImageDeeplink}"/>          
          <a href="{$oBestSeller->Deeplink}">{$oBestSeller->ProductName}</a>
        </div>
      </li>
    {/section}
    </ol>
    
    ...    
  </body>
</html>

Your own logon screen

Using below code your can create your login window within your theme. For more information on the variables used in this example, please have a look at the documentation, part list of variables. <!DOCTYPE html>
<html>
  <head>
    {$_IncludeHead}
    <style type="text/css">
      
    </style>
  </head>
  <body {$sBodyLogic}>    
    ...
    
    {if $bCustomerLoginActive == true}
      {if $bCustomerLoggedIn == false}
        <form id="UL_Login" method="post" action="{$sCustomerLoginPageDeeplink}">          
          <input type="text" name="UL_USERNAME" placeholder="Je gebruikersnaam"/><br/>
          <input type="text" name="UL_PASSWORD" placeholder="Je wachtwoord"/><br/>
          <span class="PredefinedButton" onclick="$('#UL_Login').submit();">Inloggen</span>
          
          {if $sCustomerLoginSystemType != 'ActiveNoRegistration'}
            Nog geen klant? Klik hieronder om een account aan te maken.
            <span class="PredefinedButton" onclick="GA_link('{$sCustomerRegistrationPageDeeplink}');">Registreren</span>
          {/if}
        </form>
      {else}
        Welkom {$sCustomerName},<br/><br/>
        
        {if $fCustomerDiscount > 0}
          Jouw standaardkorting: {$fCustomerDiscount}%.<br/><br/>
        {/if}
        
        <span class="PredefinedButton" onclick="window.location = '{$sCustomerLogoutPageDeeplink}';">Uitloggen</span>
      {/if}
    {/if}
    
    ...    
  </body>
</html>

Shopping basket with automatic update

Using below code you can create your own shoppingbasket window that updates automatically if a visitor “continues shopping”. <!DOCTYPE html>
<html>
  <head>
    {$_IncludeHead}
    <style type="text/css">
      
    </style>
  </head>
  <body {$sBodyLogic}>    
    ...
    
    {* plugin *}
      <div id="SmallBasket">
        {if $aOrderRows|@count eq 0}
          {* ml
            sBasketLine
              :nl[Er zijn nog geen producten in uw winkelmand geplaatst.]
              :en[There are no products in your shopping cart yet.]
              :de[Es gibt keine Produkte in Ihrem Warenkorb.]
              :fr[Il n'y a aucun produit dans votre panier pour le moment.]
          /ml *}
          {$sBasketLine}
        {else}
                  
          <table cellpadding="0" cellspacing="0" width="100%">
            {$fTotal = 0}
            {foreach from=$aOrderRows item=oOrderRow}
              {$fTotal = $fTotal + $oOrderRow->TotalPrice}
              <tr>
                <td style="width:30px; text-align:center;">{$oOrderRow->Count}</td>
                <td style="width:15px;"> × </td>
                <td>{$oOrderRow->ProductName|middle_truncate:50:3}</td>
                <td style="width:15px; text-align:center;"> {$sCurrency} </td>
                <td style="width:50px; text-align:right;">{$oOrderRow->PriceFormatted}</td>
              </tr>
            {/foreach}
            <tr>
              <td colspan="3"></td>
              <td style="width:15px; text-align:center;"> {$sCurrency} </td>
              <td style="width:50px; text-align:right;">{$fTotal|number_format:'2':',':'.'}</td>
            </tr>
          </table>
                  
          {* ml
            sPayButton
              :nl[Afrekenen]
              :en[Checkout]
              :de[Abrechnen]
              :fr[Régler]
          /ml *}
          <input type="button" value="{$sPayButton}" onclick="window.location = '{$sBasketPageDeeplink}';"/>
                  
        {/if}
      </div>
    {* /plugin *}
      
    ...    
  </body>
</html>

A category display of your own

A category display can be chosen in category management and for certain elements on the modular page. <!DOCTYPE html>
<html>
  <head>
    {$_IncludeHead}
    <style type="text/css">
      
    </style>
  </head>
  <body {$sBodyLogic}>    
    ...
    
    {* plugin *}
      <div id="SmallBasket">
        {if $aOrderRows|@count eq 0}
          {* ml
            sBasketLine
              :nl[Er zijn nog geen producten in uw winkelmand geplaatst.]
              :en[There are no products in your shopping cart yet.]
              :de[Es gibt keine Produkte in Ihrem Warenkorb.]
              :fr[Il n'y a aucun produit dans votre panier pour le moment.]
          /ml *}
          {$sBasketLine}
        {else}
                  
          <table cellpadding="0" cellspacing="0" width="100%">
            {$fTotal = 0}
            {foreach from=$aOrderRows item=oOrderRow}
              {$fTotal = $fTotal + $oOrderRow->TotalPrice}
              <tr>
                <td style="width:30px; text-align:center;">{$oOrderRow->Count}</td>
                <td style="width:15px;"> × </td>
                <td>{$oOrderRow->ProductName|middle_truncate:50:3}</td>
                <td style="width:15px; text-align:center;"> {$sCurrency} </td>
                <td style="width:50px; text-align:right;">{$oOrderRow->PriceFormatted}</td>
              </tr>
            {/foreach}
            <tr>
              <td colspan="3"></td>
              <td style="width:15px; text-align:center;"> {$sCurrency} </td>
              <td style="width:50px; text-align:right;">{$fTotal|number_format:'2':',':'.'}</td>
            </tr>
          </table>
                  
          {* ml
            sPayButton
              :nl[Afrekenen]
              :en[Checkout]
              :de[Abrechnen]
              :fr[Régler]
          /ml *}
          <input type="button" value="{$sPayButton}" onclick="window.location = '{$sBasketPageDeeplink}';"/>
                  
        {/if}
      </div>
    {* /plugin *}
      
    ...    
  </body>
</html>

Sub-sub categories

Below is an example, how to get your subcategories and the categories of your subcategorie. <!DOCTYPE html>
<html>
  <head>
    {$_IncludeHead}
    <style type="text/css">

    </style>
  </head>

  <body {$sBodyLogic}>    
    ...
    {$iCounted = 0}
      {foreach from=$aCategories item=oCategory}
        <li id="{$oCategory->Id}" class="menu-main-1">
          <a class="top-cat" href="{$oCategory->Deeplink}">{$oCategory->Name}</a>
          {if $oCategory->SubCategories|@count gt 0}
            <ul>
              {foreach from=$oCategory->SubCategories item=oSubCategory}
                <li class="yourclass">
                  <a href="{$oSubCategory->Deeplink}">{$oSubCategory->Name}</a>
                    {if $oSubCategory->SubCategories|@count gt 0}
                    <ul>
                      {foreach from=$oSubCategory->SubCategories item=oSubCategory}
                        <li class="yourclass">
                          <a href="{$oSubCategory->Deeplink}">{$oSubCategory->Name}</a>
                          {if $oSubCategory->SubCategories|@count gt 0}
                            <ul>
                              {foreach from=$oSubCategory->SubCategories item=oSubCategory}
                                <li class="yourclass">
                                  <a href="{$oSubCategory->Deeplink}">{$oSubCategory->Name}</a>
                                </li>
                              {/foreach}
                            </ul>
                          {/if}
                        </li>
                      {/foreach}
                    </ul>
                  {/if}
                </li>
              {/foreach}
            </ul>
          {/if}
        </li>
      {$iCounted = $iCounted+1}
      {/foreach}
    ...    
  </body>
</html>
Edit Protom pages with your own editor!
Using Webdav
 

General

The url that is used too connect to the WebDAV instance of your CCV Shop is generated as followed: https://{webshopssldomain}/API/EndPoint/Server.php. You can use this url in any webdav client you like.

Before you can use this feature you have too generate a username and password. You can find this feature after enabling the Protom module listed below the tab "own theme's". After clicking on "start connecting" you will get a username and password. This password is saved encrypted and thusfore listed once.

Unlucky theme names are not unique in CCV Shop and therefore an unique number will be part of the directory listing.

Limitations

There are a couple of limitations and features we do not support (yet?). It is not possible too create files, or upload images. Also the settings must be created in CCV Shop.