| |
Categories
|
Home - Design and Layout - Examples of design changes (12-16)
Examples of design changes (12-16)
Example 12:
You need to change the order of product fields.
|
This can be applied only to the fields In stock, Quantity, Our quantity discounts and Minimum quantity for "product" is "...". These fields can be moved relatively each other and the Add to cart button. |
| |
Open the file skins\SKIN_NAME\customer\views\products\components\buy_now.tpl and find there the following line
1. |
{hook name="products:options_advanced"} |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
Here begins the list of product options.
The field In stock is represented by the following code:
Click here
|
| |
|
The list of options created in the admin panel. Their order can be changed in the admin panel (the parameter Position):
1.
2.
3. |
{if !$simple && $product.product_options}
{include file="views/products/components/product_options.tpl" id=$obj_id product_options=$product.product_options name="product_data"}
{/if} |
|
| |
|
The field Quantity is in the same block as Our quantity discounts:
Click here
If you want to swap them, do it in the following way:
Click here
If you want to separate these fields, this can done as follows:
Click here
Now you can move these fields independently of each other.
The field Minimum quantity for "product" is "..." is defined here:
1.
2.
3. |
{if $product.min_qty}
<p>{$lang.text_cart_min_qty|replace:"[product]":$product.product|replace:"[quantity]"
:$product.min_qty}</p>
{/if} |
|
| |
|
All the blocks listed above can be moved relative to each other and the button Add to cart.
|
| |
|
Example 13:
Hiding product fields.
The product fields are given in the file skins\SKIN_NAME\customer\views\products\components\buy_now.tpl. To hide them you can use the class hidden.
To hide the field In stock
Click here
To hide all options created in the admin panel (to disable some of them, use the Status parameter in the admin panel).
1.
2.
3. |
{if !$simple && $product.product_options}
<div class="hidden">{include file="views/products/components/product_options.tpl" id=$obj_id product_options=$product.product_options name="product_data"}</div>
{/if} |
|
| |
|
To hide the field Quantity:
Click here
To hide the field Our quantity discounts:
1.
2.
3. |
{if $product.prices}
<div class="hidden">{include file="views/products/components/products_qty_discounts.tpl"}</div>
{/if} |
|
| |
|
To hide the field Minimum quantity for "product" is "...":
1.
2.
3. |
{if $product.min_qty}
<p class="hidden">{$lang.text_cart_min_qty|replace:"[product]":$product.product
|replace:"[quantity]":$product.min_qty}</p>
{/if} |
|
| |
|
Example 14:
Changing the order of the fields in the invoice
To make changes to the invoice you need to edit the invoice.tpl file located in the skins\SKIN_NAME\mail\orders directory.
The following code is the billing address:
Click here
|
You can move any variables, but remember the display conditions.
|
For example, to move the state name
Click here
The same is true for the shipping address:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21. |
{if $order_info.s_firstname || $order_info.s_lastname}
<p style="margin: 2px 0px 3px 0px;">
{$order_info.s_firstname} {$order_info.s_lastname}
</p>
{/if}
{if $order_info.s_address || $order_info.s_address_2}
<p style="margin: 2px 0px 3px 0px;">
{$order_info.s_address} {$order_info.s_address_2}
</p>
{/if}
{if $order_info.s_city || $order_info.s_state_descr || $order_info.s_zipcode}
<p style="margin: 2px 0px 3px 0px;">
{$order_info.s_city} {$order_info.s_state_descr} {$order_info.s_zipcode}
</p>
{/if}
{if $order_info.s_country_descr}
<p style="margin: 2px 0px 3px 0px;">
{$order_info.s_country_descr}
</p>
{/if}
{include file="profiles/profiles_extra_fields.tpl" fields=$profile_fields.S} |
Such changes can also be made to other pages where an address is displayed. If you want the address format to be the same on all pages, make the corresponding changes to the following files:
skins\SKIN_NAME\mail\addons\rma\slip.tpl (packing slip in the customer area)
skins\SKIN_NAME\mail\orders\print_packing_slip.tpl (packing slip in the admin panel)
skins\SKIN_NAME\admin\views\profiles\components\profiles_info.tpl (order details page)
|
| |
|
Example 15:
Changing the logo for a gift certificate
In order to replace SP-Cart logo with your own one, you should put your logo with the your_logo.gif name to the skins/SKIN_NAME/mail/images directory and replace the corresponding filename in the manifest.ini file located in the skins/SKIN_NAME directory with your one:
1.
2.
3.
4. |
[Gift_certificate_logo]
filename = "your_logo.gif"
width = 176
height = 47 |
Also, in the code above you should edit the values of the "width" and "height" parameters according to your logo sizes. Save the file.
|
| |
|
Example 16:
Changing the "Home" link in breadcrumbs
In order to change the Home link please modify the init.php file located in the SPCART_DIRECTORY/controllers/customer directory and replace there the following line of the code:
1. |
fn_add_breadcrumb(fn_get_lang_var('home'), $index_script); |
with this one:
1. |
fn_add_breadcrumb(fn_get_lang_var('home'),"http://www.domain.com"); |
where replace http://www.domain.com with your link. Save the file and check the result.
|
| |
|
|
| |
|
<< Previous 5 examples Read Next >> |
| |
|
|