How to add php code in custom blocks
You can add php-code to your custom block with php tags, and operate with contents using $block_body variable. This variable consists of all the html text you have in your block.
To activate PHP code functionality for custom blocks, please go to Administration > System > Global Settings and select where you want to insert your php code. Also, don't forget to switch from the 'WYSIWYG HTML Editor' to 'Textarea Editor' to view the code in your custom blocks correctly. Then open your custom block and insert your php code in the 'Block Content' textarea.
The basic code will look like this:
Feel free to add any text here <br> Something <?php echo "1";>
// simple php code
or like this:
Feel free to add any text here <br> Something <?php $block_body = str_replace("Something", "Anything", $block_body); ?>
// php code with a variable replacement
Here is an example of code that can be used in the footer body:
©CopyRight 2004 - {current_year} - All Rights Reserved
<?php
$block_body = str_replace("{current_year}", date("Y"), $block_body);
?>
|
|
|
How to update to the latest ViArt Shop version?
To update your shop to the latest version please do the below steps:
- make a backup of all files in your current version
- make a dump of your current database
- download a new version either from http://www.viart.com/php_shopping_cart_free_evaluation_download.html or from your user's area
- unzip the archive with the new version and replace your old files with the new ones (except the ones you've modified, e.g. templates, styles, images).
- Copy the var_definition file from your backup 'includes' folder and paste it in the 'includes' folder of your new version
- Go to your Administration panel ('Administration > System > System Upgrade') and click the Upgrade Database button
- Your shop is now updated to the latest verison.
You can find more information in our online manual:
http://www.viart.com/php_shopping_cart_backing_up.html
http://www.viart.com/ecommerce_system_upgrading.html
|
|
|
How to add "Related Products" block
In order to add the 'Related Products' block, please go to 'Administration > CMS > Site Layout > Products Details Page', choose the 'Products (Related)' block from the 'Available blocks' section and add it to the corresponding column. Then press the 'Update' button, and the changes will be applied.
Also, you should add related products via Administration > Products&Categories > Related link (under the title of the product).
|
|
|
Is ViArt software Open Source ?
ViArt Shop contains 97% of open source code; the remaining 3% of the code is encoded within libraries in the ./includes folder. Here is the full list of encoded files:
date_functions.php
editgrid.php
navigator.php
record.php
sorter.php
support_parser.php
template.php
tree.php
url.php
va_functions.php
Within the 97% of open code it is possible to fully customize ViArt to your individual needs.
ViArt Shop represents the culmination of thousands of man hours of work and we encode certain parts of it to protect this work which represents substantial investment on our part. By charging a fee for our work and protecting our intellectual property we are able to reinvest in the product to the advantage of all our users.
|
|
|
Add VAT validation field
To add VAT validation, please implement the following steps:
1. Add a field (e.g. "EU-VAT Number") at:
Administration > Orders > Order profile Page ->Add New Custom Field
and set "Field Type" to "Shopping Cart" and "Field Type" to "TextBox". Set "Show Field" to "All Orders".
To enable automatic checking and basket update as soon as a VAT number is entered, you could add a line in the custom field properties below in "JavaScript Settings" in the "OnChange" Java section. The line to add is: document.order_info.operation.value='refresh';document.order_info.submit();
2. Open your var_definition_example.php file from the 'includes' folder and uncomment the following strings:
// vat validation
//$vat_validation = true;
//$vat_obligatory_countries = array("GB");
like:
vat validation
$vat_validation = true;
$vat_obligatory_countries = array("GB");
You can specify codes of the countries from which the users will obligatory pay the VAT (regadless whether they specify a VAT number or not) in the third string, like: "GB","FR","LT", etc.
|
|
|
How to make a Personal system work with call centre orders without requesting credit card details
1. Create an empty file (you can use Notepad for this) and save it like: money_order.php.
2. Put this file to the 'payments' folder of your shop.
3. Go to Administration > Orders > Payment System, select Personal Payment system and click the 'Edit System' link.
4. Specify 'order_confirmation.php' in the Payment URL.
5. Go to the Advanced Parameters Section, tick off 'Is Advanced' option and specify 'payments/money_order.php' in both 'Advanced Library' and 'Advanced URL' fields.
6. Scroll the page up and tick off 'Use for Call Center' option.
7. Save the changes by pressing the 'Update' button.
8. Now go to Call Centre Orders and create a test order.
|
|
|
|
|
|
|
|
|
Friendly URLs don't work
Please, check your .htaccess file to include the following code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /friendly_url.php [L]
</IfModule>
or ErrorDocument 404 /friendly_url.php
Please, note that if ViArt Shop is running from some sub-folder, e.g. http://www.some-web-site.com/some-sub-folder/ then the path to friendly_url.php script should contain /some-sub-folder too, like:
RewriteRule . /some-sub-folder/friendly_url.php [L]
or
ErrorDocument 404 /some-sub-folder/friendly_url.php
If it doesn't help please let us know your web-server access details:
- Site URL
- FTP hostname, FTP login/password
- ViArt administration login/password
and we'll investigate the issue.
|
|
|
How to add robots.txt for site maps
robots.txt should have the following lines:
User-agent: *
Disallow:
Sitemap: http://YOUR_SITE/sitemap_index.xml
where YOUR_SITE is your Site URL
|
|
|
How to change the weight measure
please go Administration -> System -> Global settings -> Site Settings section -> Weight Measure option and change the value to the one you need.
|
|
|
Product is not displayed on my website
Please check the following conditions:
1. Go to ViArt Admin -> Products -> products list on the right -> "Edit" link
Check the following fields:
- "Make this Product available for sales" checkbox is checked.
- "Hide off Limits Products" is unchecked or "Quantity in Stock" value greater then zero
2. Check category settings at ViArt Admin -> Products > categories list on the left -> "Edit" link
- "Show on Site" is checked
3. Check if a product is assigned to the correct category:
Please go to ViArt Admin -> Products -> products list at the right -> "Categories" link near the product
If that doesn't help please send us your Site URL, and login/password to ViArt Admin panel so we could investigate the issue.
|
|
|
Is it possible to install ViArt Shopping Cart without Zend Optimizer?
Zend Optimizer is a must for running ViArt Shop.
Please, contact your hosting company and enquire if they would install this for you, it is a free piece of software.
ViArt currently provides its own hosted service which supports Zend if you would be interested in this: http://www.viart.com/php-web-hosting
Also, we would suggest to check our 30-Day Free Trial on our server at:
http://www.viart.com/hosting_trial.php
|
|
|
How to move an existing ViArt Shop from one host to another?
Should you decide to move your existing shop from one domain to another, please do the below steps:
1. Make a backup of all files
2. Create a full SQL dump of the entire ViArt shop database
3. Edit includes/var_definition.php file and check the following parameters:
>$db_name
>$db_host
>$db_port
>$db_user
>$db_password
Further, go to ViArt Admin -> System > Global Settings and change the Site URL field.
Please, do not forget to contact our support team to activate the new domain name - and re-generate a new license file.
|
|
|
Tracking code for WorldPay
There are two ways to place tracking scripts on your site:
1. You can customize Success and Failure result pages of WorldPay and add tracking code to them using the following knowledge base article: http://support.worldpay.com/kb/customising3/result_pages/ppcg_3000.html
2. It is possible to set up Callback function in your WorldPay account using the manual
http://support.worldpay.com/kb/reference/faqs/callback_faqs.html#callback_configure
Then, you can add tracking code to field 'On Success Message' on 'Final Checkout Settings' page of WorldPay system in Viart Shop.
|
|
|
Add blocks to custom pages
At present, if you want to add blocks to a custom page you should use articles as custom pages. For this go to Administration > Articles > Articles Settings and click the 'New Articles Type' link. Fill the necessary fields and save the type. Then click on the newly created type and create a new article for this category. This article will be your custom page. When the article is created click the 'Details Layout' (above the name of your article) add the blocks you want for this page. Then come back to your article, click the 'Edit' link and copy the path to this custom page, like: article.php?category_id=31&article_id=26. Type this path in the browser bar after the URL of your site (eg. yoursite.com/article.php?category_id=31&article_id=26) and your custom page will be displayed.
Also, you can create a custom page (via Administration > CMS > Custom Pages) and enter the path: article.php?category_id=31&article_id=26 into the 'Redirect to URL' field. Then your custom page will appear in the menu.
Currently, this is the only possible way. In future releases we are planning to make it possible to add columns and blocks directly to custom pages.
|
|
|
Features for product importing
-To add some product and create a tree of categories you can use the following syntax in CSV file:
item_id,item_name,category
123,Product1,Category Name>Sub Category 1>Sub Sub Category 1
345,Product2,Category Name>Sub Category 1>Sub Sub Category 2
This will add or update 2 products and assign them to categories 'Sub Sub Category 1' and 'Sub Sub Category 2' accordingly.
-To assign a product to several categories you can use the following syntax:
item_id,item_name,category
123,Product1,Category1;Subcategory2;Subsubcategory3
This will add or update Product1 and assign it to 3 categories subsequently - 'Category1', 'Subcategory2' and 'Subsubcategory3'.
|
|
|
How to make a redirect to www.yoursite.com
If you haven't done a redirect from yoursite.com to www.yoursite.com, your users may face problems with making orders if they enter www.yoursite.com instead of yoursite.com. In other words, they will add products, but when going to the checkout they will see that their basket is empty. In order to fix this you are to make the following steps, namely:
1. Create an empty file named '.htaccess' in your public_html_folder.
2. Fill it with the below text:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursite.com$
RewriteRule ^(/)?(.*) http://www.yoursite.com/$2 [R=301,L]
3. Save the file, and enter the address: 'yoursite.com' in the browser's bar. If you have done the first two steps correctly, then you will see that yoursite.com is redirected to www.yoursite.com. This means that you have done the trick!
|
|
|
Empty response from PayPal
We would recommend to use an absolute path to your SSLCert, like: /home/user_name/public_html/pro/cert_key_pem.txt
Please, also check if your server allows you the outgoing connections as sometimes some hosting providers require using proxy settings.
|
|
|
What are friendly URLs?
Friendly URL is our new feature which allows you creating search engine friendly URLs. You can create them manually or let the system do this for you. First of all please go to Administration > System > System Settings > Friendly URLs Settings, turn on the feature (Activate Friendly URLs), select how you want these URLs to be generated (Auto-generate Friendly URLs) and extensions ( Friendly Extension). These are general settings for friendly URLs. However, note that you have to set up your apache as well. Please create a .htaccess file in your root folder and write the following string into it
ErrorDocument 404 /friendly_url.php
After that please restart the apache. Your friendly URL option should be active now. You can set up friendly URLs for individual products at Administration > Shopping Cart > Products and Categories > product details > Friendly URL.
To configure fURLs on your IIS, you are to do the following:
1) Open IIS Manage.
2) Right Click on the web site node and choose properties.
3) Click on the Custom Errors Tab.
4) Scroll down until you see the HTTP Error -- 404.
5) Double click on 404 to open the "Error Mapping Properties" dialog.
6) Change the Message Type to URL.
7) For the URL enter in /friendly_url.php
8) Click OK and Then OK again
You can also refer to this page to get more information on this topic: http://www.prusak.com/archives/2006-01-23/ipb-seo-friendly-urls-with-iis/
|
|
|
How to set the maximum upload limit?
Actually, there is a special setting in the 'php.ini' file:
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
This means that the maximum size of uploaded files is 2 Mb.
So, all other files that exceed 2 Mb should be uploaded via an FTP program into the appropriate folder for downloadable products.
|
|
|
|
|
|
|
|
|
What is the difference between 'Make this Product available for sales' & 'Approved ' options?
The purpose of the "Approved" button is to allow site administrator to approve or not approve products posted on his site by the merchants. When a product is posted by a merchant it is automatically added with "Not approved" status. As a site owner you can review product(s) and decide whether to approve it(them) or not.
The option "Make this Product available for sales" permits to choose whether to show your product on your site.
|
|
|
How to move from the Free version to the commercial one?
In order to move from ViArt Free Version to the commercial one, you need to choose and purchase the license that best suits your needs. We shall send you a unique license number that you are to activate and put the 'license.php' file in the 'includes' folder of your shop. The purchase of the license will not require re-installing your database or shop.
In case you need to upgrade your license to a higher version later, you will only have to pay the difference in price between the Editions.
|
|
|
Images allowed for uploading to PDF invoices
At present, the PHP-based PDF generation facility in ViArt Shop supports only JPEG images. PDF lib based generation can use JPEG, GIF and PNG images, but will require an installation of a separate PDF library. So, we would recommend to use JPEG images for PDF invoices.
|
|
|
How to set the default language
To change the default language into your own one, please open your var_definition.php. file, find the string: $default_language = "en" and change "en" to "tr", for example. Save the changes and access your site. Your default language will be the one you specify in the var_definition.php file.
|
|
|
"Zend not installed" error
If this error ocurred it is recommended to check whether your Zend Optimizer is installed correctly. To test it you can create a small script file like test.php that contains:
<?php phpinfo(); ?>
and look at the result output of the function. Then search for the section named 'Zend Optimizer' which contains listing of some Zend variables and their settings. If it doesn't exists it means that Zend Optimizer is not installed.
Also, make sure that you have installed a compatible version of Zend Optimizer. We would recommend 2.6.2 version for PHP 4 and 3.2 version for PHP 5.
|
|
|
How to replace a ViArt logo with your own logo?
If you have a version earlier than 3.1, please do the following to replace ViArt logo:
1. Upload the image you wish to use by ftp.
2. Open an appropriate file in the styles folder .. i.e. default.
3. Within this file find the code:
.headerMenu td#logo img { /* Logo on the site */
width: 176px;
height: 81px;
border: 0px solid #333;
background: url(../images/default/logo.gif);
}
4. Change "../images/default/logo.gif" to the location of your logo, and also change the "width: 176px;" "height: 81px;" to match your logo.
Starting from version 3.1 the procedure of replacing ViArt Logo has become much more easier.
1. Save the image with your logo in the root images folder.
2. Go to Administration > System > System Settings, click the 'Select Image' link and select the image with your logo.
3. Save the changes and your image will be added to your site.
Please note that if you use Curved Layout for your site the procedure of adding your logo is a little bit different. To add your logo for Curved Layout please go to Administration > CMS > Site Layout > and click the 'Site Navigation' link. Find the 'Empty' field (it is number 7 by default) and enter the path to your logo image instead of ViArt logo image in the 'Menu Image' field. Save the changes and ViArt logo will be replaced with your logo.
|
|
|
How to add new layouts after upgrading to the latest version
New layouts are predefined only if a new version is installed. If you just upgrade from your current version to the latest, you have to add these new layouts after the upgrade procedure. New layouts are based on CSS files - convex.css, default.css, ecommerce.css, fashion.css, marine.css and rainbow.css
To add a new layout please go to Administration > ViArt CMS > Site Layout, click the Add New Layout link and fill the following fields there:
a) Layout Name - any name of your layout.
b) Style Name - one of the style names mentioned above, e.g. 'ecommerce'
c) Templates Directory: ./templates/user
d) Admin Templates Directory: ../templates/admin
Click the 'Add New' button and this layout will be added. You can do the same procedure for other layouts as well.
|
|
|
What files are zend encoded within your software?
All the encoded files are located within the 'includes' folder. Here is the full list:
date_functions.php
editgrid.php
navigator.php
record.php
sorter.php
support_parser.php
template.php
tree.php
url.php
va_functions.php
|
|
|
What languages does ViArt Shop support?
At present ViArt Shop supports the following languages: Arabic, Czech, German, Greek, English, Spanish, Finnish, Hungarian, Italian, Lithuanian, Latvian, Dutch, Polish, Portuguese, Russian, Slovak, Swedish, Turkish, and Ukrainian. All messages are located in the 'messages' folder. For example for the English language they are located in the 'messages/en/' folder.
To add a new language you need to copy all message files into a new
folder e.g. 'messages/da/' for Danish, and then add that language
option to the static table 'languages' in the admin section.
We offer 30% discount for anyone who is willing to translate ViArt into another language for us.
We would send you all of the messages in an excel spreadsheet and after translation we add the language files to future releases of Viart Shop.
The messages are text for labels and prompts which are used throughout the site. The messages do not of course include product descriptions, these must be entered manually in the language of choice.
|
|
|
|
|
|
How to access an FTP via web browser
To access an ftp via web browser, please type the following address in the browser’s bar: ftp://your username@hosting.viart.com and click enter. Then the browser will ask your login and password. Please, enter the login and password which we send to your e-mail and you will get to the server.
|
|
|
|
|
|
How to remove the link 'Powered by ViArt'?
In order to remove the link 'Powered by ViArt', you are to delete the appropriate link from 'footer.html' file in the .templates/user folder:
<div class="footerImg"><a title="ViArt - PHP Shopping Cart" href="http://www.viart.com"><img alt="ViArt - PHP Shopping Cart" src="images/tr.gif"></a></div>
</div>
</center>
Save the file and the link 'powered by viart' will be removed from your site.
|
|
|
Difference between reseller program and multiple site license
A reseller program and multiple license program are different things. The main difference is that Multiple site license consists of one serial number while resellers receive as many serial numbers as many copies of the product they purchase. In other words, mutiple site license is usually purchased by companies who own several websites and this license is not for reselling. If you join our reseller program you can buy either one licensed version or multiple licensed version and you are allowed to resell the license(s).
|
|
|
|
|
|
|
|
|
|
|
|
How to delete all products?
There is a function that deletes all products in the database:
http://your_site/ViArt_Shop/admin/admin_products_delete.php
Replace 'your_site' and 'ViArt_Shop' with your own parameters.
We do not have a general link to this script to avoid users accidentally deleting all products in their database.
WARNING: Any deletions can not be recovered. We would strongly suggest that you back up your database before using the script to allow a 'roll back' if required.
|
|
|
How to make a backup of my database?
You can make a backup for MySQL db using mysqldump program distributed with MySQL.
E.g.:
mysqldump --opt -u User -p Database > VA_Shop_Dump.sql
It should create file VA_Shop_Dump.sql that will contain the dump of database.
Read more about dumping MySQL database at www.mysql.org.
|
|
|
How to change language of the whole ViArt Shop?
The language in which the whole ViArt Shop operate is is selected while the installation procedure. However, if you want to change this as a later stage, you have to edit this within the var_definistion.php file which is stored in the 'includes' folder in your ViArt Shop root.
Locate the following string and change 'en' to an appropriate language code.
$default_language = "en";
Note: Correct language codes are stored at Administration > Static Tables > Languages > Language Settings.
|
|
|
Do you have a reseller program?
Yes, we do. To join our reseller program you first need to let us know how many copies of ViArt you wish to purchase to start with. We will then issue the necessary discount coupon.
The more versions you buy, the more discount you get. Please note this discount accumulates (if you buy 2 now and 2 more copies in 3 month time, it is counted at 4 versions); you do not need to buy all versions at once to get the discount.
Discount is as follows:
1-4 versions 20%
5-9 versions 30%
10 and more 40%
|
|
|
What is Zend Optimizer?
Zend Optimizer is a free application distributed by Zend Technologies, Ltd., designed to optimize PHP scripts. Zend Optimizer is a necessary prerequisite for installing ViArt Shop. You can get more info on this here.
|
|
|
How to place my text to the main page?
You could place any HTML text to the Main or Categories or Product details
pages by specifying the content for any custom block available from layout
settings.
|
|
|
Warning: Failed opening './includes/db_.php
Please check your "includes/var_definition.php" file.
Variable $db_type should contain either "mysql" or "pgsql" value.
E.g.:
// database parameters
$db_type = "mysql";
$db_name = "c2s";
|
|
|
How to populate my database with SQL script?
ViArt Online Shop distribution contains "DB" folder that includes SQL scripts
with database structure:
- MySQL_VA_Shop.sql - for MySQL Database Server
- PgSQL_VA_Shop.sql - for PostgreSQL
To populate your MySQL database with MySQL_VA_Shop.sql script run MySQL
client like the following:
mysql -u User -p Database < MySQL_VA_Shop.sql
|
|
|
How to add a user for my database?
You could add a user using GRANT command. Note that user should have rights
to select, insert, update, delete.
A MySQL Grant statement for this user would look like this:
GRANT
select, insert, update, create, alter, delete, drop
ON
database.*
TO
user@localhost
IDENTIFIED BY
'password';
|
|
|
|
|
|
It tells me "ERROR 1049: Unknown database '...
Please check your "includes/var_definition.php" file.
Variable $db_name should contain a valid database name, e.g.
$db_name = "c2s";
Run your mysql client and perform "SHOW DATABASES" command and make sure
that the database you choosen as ViArt Online Shop database does exist.
|
|
|
|
|
|
How and when updates are released?
Users who bought ViArt Online Shop automatically receive email notifications
about new release. See also "Releases" section of Members Area at
www.viart.com
|
|
|
What databases does ViArt Online Shop support?
Currently ViArt Online Shop has support for MySQL (www.mysql.org),
PostgreSQL (www.postgresql.org) and ODBC connected databases. Future releases
will include support for MsSQL and Oracle databases. You can get more information on databases supported here.
|
|
|
|
|
|
|
|
|
Why ViArt Online Shop?
ViArt Online Shop is has two main advantages: first it includes everything you
need to build a serious shipping portal, second it's flexible and highly
customizable. It means that you take ready-to-use solution and simply 'fit'
it to meet your needs. And it also means that you don't need to do ANY
programming at all - ViArt Online Shop allows changing everything via
powerful web-interface. You can get more information on ViArt Shop advantages here.
|
|
|
What are ViArt Online Shop features?
ViArt Online Shop is distributed as three different packages Light, Standard
and Enterprise. We do offer a free version as well. Therefore the list of features is different for each of them.
See our Feature List for ViArt Online Shop features comparison spreadsheet.
|
|
|
How ViArt Online Shop works?
Users simply connect to your company's website, browse your offerings, select
items that they want to purchase by inserting them into your "shopping cart",
and then proceeding to "check-out", just as they would do in a regular store.
|
|
|
What is ViArt Online Shop?
ViArt Online Shop is an electronic commerce package available to install in PHP.
It supports MySQL and PostgreSQL databases as well as ODBC connected databases.
The goal of ViArt Online Shop is to create a system capable of performing all
of the functions needed to do business online.
|
|