Académique Documents
Professionnel Documents
Culture Documents
8 – TUTORIALS
Please as far as you go with the system, write all what you have learn here. Share the
knowledge!
Por favor, tan lejos como vayas en el sistema, escribe todo lo que has aprendido aquí.
Comparte el conocimiento!
CHANGE MENU OF THE ADMIN
apartments/admin_mtg/includes/header_navigation.php
This is for the page, if you go to a category and the whole list of product is shown or if you
search and the way the list is displayed.
THIS FILES ARE TO MODIFIED THE GENERAL PAGE OF PRODUCTS LIST INSIDE A
GALLERY, ONLY THE LIST
../templates/tendency/templates/tpl_index_product_list.php
../templates/tendency/templates/tpl_modules_product_listing.php
include/modules/product_listing.php
CREATE FILTERS
http://tutorials.zen-cart.com/index.php?article=114
http://support.smallbusinesspages.org/zen-cart-custom-product-types/chapter-2-
research.html
/includes/templates/your_template/common/tpl_header.php
/includes/templates/your_template/common/tpl_footer.php
http://tutorials.zen-cart.com/index.php?article=58
includes/languages/english/YOUR_TEMPLATE/meta_tags.php
Existen 2 maneras:
A. Is adding an attribute to a product, from the admin, what happens with this method is
that you are not able to fully manipulate it. And you are no able to leave an input field
when the administrator is creating products. With this method in the admin area, exist it’s
own section. I didn’t find it very useful.
http://tutorials.zen-cart.com/index.php?article=57
B. With this method, you are able to do whatever you want with the new property or
attribute of the product.
http://www.zen-cart.com/forum/showthread.php?t=57924&highlight=add+field+product
Instructions:
How to add new properties to general products (like guarantee time, color, oem-number,
compatible models, whatsoever).
1. Think, decide which new properties you want to add to your products (in this example
we take guarantee-time (in months) and color).
2. db manipulation
Open the table "products" in your zencart-database and insert new rows at the end of the
table called "products_guarantee" and "products_color"
Here in 'collect_info.php' is the file on the admin, when you are creating a new product.
Where all the input fields exist, to add values to the new product.
3.1. At the very beginning there is the variable $parameters set. add your row-names to
the end:
add your rows with a 'p.' in front (before the "from ..." part)
3.3. now you can add the input fields in the product-mask
</tr><tr>
<td class="main">Color</td>
</tr>
somewhere around line 10 is the variable $product set. like in step 3.2 add the new
rows with a 'p.' in front just before the 'from'
around line 20 is the $sql_data_array set. add to the last lines before ');' the new
rownames.
The 'tpl_product_info_display.php' is the product page when you click and see the
whole description and properties of the product in the front end.
Done.
Contributed by Administrator
Zen Cart refers to the Home Page as the main page. So in order to show your products on
the Main Page in Zen Cart
- Set the radio button to ON (choose 1) and click the update button to save your changes.
You can also set the a specific product category by setting the category id. To set a specific
category to show on the
- Set the category ID#. For example if you have only one category defined, the enter the
number one "1" without
- This will cause your main page in Zen Cart to display your products in the category you
setup. By default the Zen Cart
main page displays your NewProducts. To remove the New Products list from your Main
Page click here. Note: to select
an item in the administrator you can click the title to go directly into edit mode. If you click
the "i" icon, you will see a
UNLIMITED STOCKS
In admin > Configuration > Stock, set check stock and subtract stock to false. Make sure
you have a quantity in stock of 1 or more in the product entry/editing page.
Quantity Discounts
Setting up quanity discounts for a product is done through the Product Price Manager. That
is located in the Catalog menu.
Find the product you would like to have the discount for, and click the Edit button.
On the new page click the Add Blank Discounts button and fill in the details for the volume
discounts.
Click the Update button at the botom of the page to apply your new settings.
SEARCH
TO MANIPULATE SEARCH
tpl_advanced_search_result.php
And on your template > common > tpl_header.php and then around line 63:
http://www.zen-cart.com/forum/showthread.php?t=122117
\includes\templates\CUSTOM\templates\tpl_advanced_search_default.php
\includes\templates\CUSTOM\templates\tpl_advanced_search_result_default.php
as well as:
\includes\templates\CUSTOM\templates\tpl_advanced_search_default.php
includes/templates/template_default/common
includes/templates/template_default/templates
If you are using a CUSTOM template, then the files that I list in this post must be edited
and saved into your custom folders.
I have a TEST SHOP which uses the CLASSIC template, so this will be my custom template
in my examples below. If you have a different template, then in the directory paths below,
substitute YOUR template wherever you see \classic\.
( includes\templates\classic\sideboxes\ )
includes\templates\template_default\sideboxes\tpl_search_header.php
PHP Code:
<?php
/**
* @package templateSystem
*/
$content = "";
Edit it as follows:-
PHP Code:
<?php
/**
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
*/
?>
<?php
$content = "";
So, you are INSERTING the following above the $content line
PHP Code:
?>
<?php
includes\templates\classic\sideboxes\
(ie: the new sideboxes folder you created in your CUSTOM template).
------------------------------------------------
NEXT STEP
------------------------------------------------
4. FTP a copy of your english.php file to your hard drive. (If you already have english.php
in your custom template, then that is the one to edit. If not, FTP this one:-
\includes\languages\english.php)
5. Open it for editing and find (around line 74)the lines:-
PHP Code:
define('BOX_HEADING_LINKS', ' [more]');
define('BOX_HEADING_CATEGORIES', 'Categories');
PHP Code:
8. FTP it into:
\includes\languages\classic\
---------------------------------------------------------------
NEXT STEP
---------------------------------------------------------------
9. Open your stylesheet.css file (again, you should edit one in your CUSTOM css folder -
\includes\templates\classic\css\stylesheet.css ).
Insert the following lines at the bottom of the stylesheet:-
PHP Code:
#searchHeaderText {
padding-top: 0.5em;
float: left;
10. Save the file, (and if you edited a copy on your hard drive, send it to your custom css
folder.)
You can adjust " padding-top: 0.5em; " to suit your needs... 0.6em, or 0.4em ...
ADVANCE SEARCH
The query for the search feature in the shop is created (for v1.2.x) in:
includes/blocks/blk_advanced_search_result.php
If you want to adjust which database columns to search through, you would have to
manipulate the variable $where_str in that file.
Remember that by combining php and html (html would go in the proper template file) you
can use form input, like checkboxes or drop-down menus, to decide how to create the
query.
Sort order
The search results use the same sort order as the other product listings. If you want to use
a separate sort order for search results, you need to adjust the variable $order_str in
includes/blocks/blk_advanced_search_result.php
To tell the search not to use the description, simply set the right parameter: Use the
Developers Toolkit and search the catalog-side template files for search_in_description = 1
and change it to 0 instead of 1 in the appropriate file ... typically either tpl_search.php or
tpl_search_header.php depending on which search box you're using.
Edit /includes/templates/your_template/sideboxes/tpl_search.php
Note that this applies the change only the quick search sidebox.
search_in_description = 1
but
'search_in_description', '1'
/includes/templates/template_default/sideboxes/tpl_search.php
and
/includes/templates/template_default/sideboxes/tpl_search_header.php
/includes/templates/YOUR_CUSTOM_TEMPLATE/sideboxes/
'search_in_description', '1'
to be
'search_in_description', '0'
AFTER YOU PRESS THE BUY NOW BTN, this page in shown.
includes\templates\template_default\templates\tpl_shopping_cart_default.php
I would like to make the output conditional upon a value being present in the DB.
Could you expand on your PHP a little bit. I am having a little trouble with the logic.
Guarantee: <?php echo $product_info->fields['products_guarantee']; ?>
LANGUAGES
If you want to eliminate “Welcome Guest!” Would you like to log yourself in?” message
completely, turn off the Customer Greeting in your Admin -> Configuration -> Layout
settings -> Customer Greeting -> Show on Index Page and set to 0.
If you want to replace this message with one of your own, start your text editor and open
the includes/languages/ENGLISH/index.php file and locate these lines of code
if (STORE_STATUS == '0') {
} else {
As you can see, there are two Welcome messages depending upon whether you wish Zen
Cart to be a fully functioning store, or just a showroom.
MAIN PAGE TEXT
original
Code:
p.master_categories_id
replacement:
Code:
if ($_SESSION['language'] == "english"){
$random_whats_new_sidebox_product_query= "select distinct p.products_id,
p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
p.master_categories_id
p.master_categories_id
INSTALLATION TUTORIAL
1. Go to
http://www.zen-cart.com/
3. Upload the zipfile downloaded from zen cart and put it inside your root folder
5.
Rename this file to configure.php and change the permissions to 0777 (read-write-execute
for all)
Rename this file to configure.php and change the permissions to 0777 (read-write-execute
for all)
6.
* /store/cache
* /store/images
* /store/includes/languages/english/html_includes
* /store/media
* /store/pub
* /store/admin/backups
* /store/admin/images/graphs
and, also:
* /store/images/attributes
* /store/images/banners
* /store/images/categories
* /store/images/large
* /store/images/large/dvd
* /store/images/manufacturers
* /store/images/medium
* /store/images/upload
7. Create a Text File with all the usernames, passwords and information that we are gonna
use, name it security,and leave inside the main folder of the client, never upload this file.
7.A
MySQL Databases
7.B
On create a New Database: (Write the name), in this case > tendecystore
7.C.
MySQL User
PassWord : ******
7.D
7.E
Now In the file organize the information above like this:
Database Host:localhost
Database Name:newyorn6_zencart
Database User:newyorn6_lemonk
psw: unitedcolors
Be aware that when you create the Databse Name and UserName the letters newyorn6_
are always attached before the names, use them in this ways.
7.F
Also we need to write the information below, changing it to the corresponding domain or
URL
So for this example we are using the store from the domain tendencygroup.com, replace
the domain information as you need.
THIS IS THE CPANEL PATH, WHERE YOU CAN FIND THE STORE
Example: /home/newyorn6/public_html/tendencygroup.com/store
THIS PATH IS WHERE YOU CAN FIND THE STORE
"The Virtual HTTP Path (the URL to your domain and directory for your shop)"
Example: http://www.tendencygroup.com/store
Example: https://www.tendencygroup.com
"The Virtual HTTPS Path (the secure URL to your domain and directory for your shop)"
Example: https://www.tendencygroup.com/store
9. Now you are ready to set up the zen cart, so go to the domian and the store folder >>
http://tendencygroup.com/store
10. Zen Cart wellcome you, do next untill you find the DataBase setup, use the information
that you have on the text file to set up this part, and click on SAVE DATABASE SETTINGS
11.
Now you are int the System Setting windows, Zen Cart will detect all the settings that you
need then click on
12. Now you are in the phpBB setUp, just click Save phpBB Settings
Fill Out all the information has you need, and save changes.
14. Now you are in the Admin Setup > Fill the information, the email will always be
info@newyorkdesignlab.com
15.
NEXT STEPS
For security, you will need to reset your configure.php files located in the /admin/includes/
and /includes/ folders back to read-only mode before allowing people to access your store,
so change it to 0444.
Additionally, you'll want to remove the /zc_install folder so that someone can't re-install
your shop again and wipe out your database! Warnings will appear until the folder has
been removed or renamed.
GREAT MODULES
WishList
http://eazyecommerce.com/web-templates/zen-cart/modules/wishlist-manager
FILTERS
http://www.ballparksofbaseball.com/new/docs/product_types_readme.html
templates/tendency/templates/tpl_login_default.php
templates/tendency/templates/tpl_modules_create_account.php