Tutorials
- Details
- Written by: Xavier
- Category: Tutorials
- Hits: 7446
|
|
Description
The goal of this tutorial is to show how to manage the tabs in the tabular product view.
You will have to edit views, so please read the tutorial on how to customize the display: Here
The view in question is the "product / show_tabular" one.
The edition page of a view starts with the View Builder, a list of the blocks of the view: the tab titles ("DESCRIPTION TAB TITLE", "SPECIFICATION TAB TITLE", etc.) and the tab contents ("DESCRIPTION", "SPECIFICATIONS", etc.) are blocks of their own. You can drag a block to change the order of the tabs, then use the code editor below for the finer changes explained here.

Manage tab titles
So you have to edit the view "product / show_tabular", one on the edition page of that view, scroll down until the "hikashop_product_bottom_part".
Here you will see the div "hikashop_tabs_div" which contain all the tabs titles and contents.
To manage the titles, you can find them in the HTML "li", for example by default you have the tabs:
- hikashop_show_tabular_description_li
- hikashop_show_tabular_specification_li
- hikashop_show_tabular_comment_li
- hikashop_show_tabular_new_comment_li

There is one important thing to know here, if you add or edit a tab id, it must contain "_li" at the end, this is used by a JavaScript rule when clicking on a tab.
If you want to add a new tab, you just have to add a HTML "li" entry with the desired id ending by "_li", for example:

How to translate my tab title ?
As you can see the name which will be displayed on the product page for this tab is "My tab !". This is a text which can't be translated. To have a text which can be translated you have to use the code:
<?php echo \Joomla\CMS\Language\Text::_('MY_TAB'); ?>
And add a translation like: MY_TAB="My tab !", if you don't know how the translations are working, please read that FAQ: Here
Is it possible to change the title of an existing tab ?
Of course it is, you just have to add a translation override as explained before and translate it as you want. Or you can directly change the text in the PHP Text::_ function to something else and add you translation override.
How can I change the ordering of my tabs ?
It is easy, you just have to change the order of the "li" elements as you want.
Be careful, you have to let the "comment" tabs in the PHP if condition, else they will be displayed anytime, even if you disabled the comments in the settings.
Edit the tab content
The contents of the tabs are after the titles in the code. You can retrieve them thanks to their ids, they have the same ids as the titles but without the "_li" at the end.
So to edit the content of an existing div, you have to play with the code inside the div of the desired id.
For example the code to edit for the "description" tab is the div with the id "hikashop_show_tabular_description":

To add content to the new tab, create a new div with the correct id, as my tab title id is "my_tab_li", so the div for the content must have the id "my_tab", logical, isn't it ?
For styling issues, please add the class "hikashop_tabs_content" to your new tab div, the result must something like:

This div must be inside the div with the id "hikashop_tabs_div".
Change the tab openned by default
You want that another tab be openned by default when reaching the page ?
Please scroll down to the end of the code and in the HTML tag:

Replace the "value" by the id of the desired tab. (without "_li" at the end), for example to have the new tab set as default set the value to "my_tab".
My tabs are not working
First of all, if you already had an override on the view "product / show_tabular" please back it up, then delete the override and restart from the default content of the view.
You potentially didn't had the latest version of the view.
Check if the tab titles part and the div one are presents in the div with the id "hikashop_tabs_div".
- Details
- Written by: Lavocat
- Category: Tutorials
- Hits: 11455
|
|
Description
The limit system able you to define a limit through different parameters, so you can choose your period (like Cart, Daily, Weekly etc...) and the limit type (like Quantity, Price, Weight) for each limit, plus you can limit different order status type.
When the limit is reached, a message will be display to inform the customer, and the quantity is reduced or the product is not added to the cart.

First, to find the Limit settings you must go to HikaShop (in components) and open the Products menu, then Limit.
Now, you're in the Limit list. Click on New to create a limit.

Settings
You have different possible settings in this page to define your limit. The left block, Main information, defines what is limited:

- Period : You can define on which period is base your limit, you can pick : Cart, Daily, Weekly, Monthly, Quarterly, Yearly and Forever.
- Type : Choose on which eligibility criterium will be define your limit, here you have three choices : Quantity, Price and Weight.
- Value : Just type the value you want to set, for example if you picked "Quantity Type", the number of products, or if you picked "Price Type", the price without currency symbol.
- Weight symbols : If you have picked "Weight Type" you can define symbols link to this Type.
- Currency : Same idea than Weight symbols but if you picked the "Price Type".
- Published : As usual, this is for turn On/Yes or turn Off/no the limit.
The right block, Restrictions, defines when and on what the limit is used:
- Start date : Here you can choose the start date to enable the limit.
- End date : Same idea than above but to end the limit process.
Note : If you let these 2 dates parameters empty, the limit will be use now and until the limit is unpublished.
- Product : Define on which product will be used the limit.
- Category : Same idea than above but to select one or several categories.
Note : If you let these 2 parameters empty, the limit will be use on all products and all category.
Note : Thanks to the Namebox system, for select a product or a Category, you can select just by clicking in the input, OR by typing the product name!
WARNING : If you select a category, which include some sub-category the limit will not be effective on these sub-categories products!
To affect sub-category products, you must select directly this sub-category (the category field accepts several categories, so you can select both the category and its sub-categories in one limit).
- Order status : Define the order status limit to : all statuses, or one or several of the order statuses of your shop (created, confirmed, cancelled, refunded, shipped...). Hold the Ctrl key to select several of them.
- Access level : With the Business edition, restrict the limit to some user groups.
Note : A little more explanation, the aim is for example, if you set on a long period (start with daily to forever) you can authorize just 5 quantity products with the order status "shipped".
So, if the customer order 5 products, he can order other products until the first order reach the order status "shipped"!
Note : To use the order status limit, the period can't be set on "cart", or the order status limit will be only on the created order status.
Concrete Examples
We will now see some concretes examples of Limit settings.
Price Example
Here we have set "Period" on Cart, "Type" on Price and "Value" on 60, which means that the customer can only add for 60 Euros per Cart.

BUT the limit is set just on a product, here "Small Batch Filter Coffee - 1 kg" (25,64 Euros each), so it's impossible for the customer to buy for more than 60 Euros of this product: when he tries to add 3 of them (76,92 Euros), a message tells him he can't add more than 2 items.

Quantity Example
Here we have set "Period" on Cart, "Type" on Quantity and "Value" on 3, which means that the customer can only add 3 products from this category per Cart.

BUT the limit is set on a category, here "Pens & Pencils", so when the customer tries to add 4 products of this category, the quantity in the cart is limited to 3.

Period and Order Status Example
Here we have set "Period" on Weekly, "Type" on Quantity and "Value" on 5, with the order status "Created", which means that the customer can only have 5 products in created orders per week. As neither a product nor a category is selected, the limit applies to all the products.

If the customer has already ordered 3 products this week, he can only add 2 more products to his cart.
- Details
- Written by: Lavocat
- Category: Tutorials
- Hits: 17509

New European Union VAT rules
It all starts with European directive 2008/08/CE, which changes VAT rules in order to erase European disparity in e-services.
So it concerns telecommunications and of course, e-commerce.
This new rule will apply from the 01/01/2015, and from this date on, VAT rate will be determined by the customer's country, not the merchant country as it was the case for digital and telecommunication sales in the European Union.
So the customers will pay a different amount of taxes based on their country for such sales.
Of course, the price will change for the customer, and for the seller you will have to give back the VAT amount charged to the customers to each corresponding country.
In order to simplify that process, you will be able to use the MOSS single window.
The MOSS single window was created especially for collecting the VAT along with this directive.
First, it's important that you register to this MOSS if you're selling within the European Union and that this directive applies to products you're selling.
You can read more about all that on the European Commission website: ec.europa.eu
We highly encourages you to contact your local tax office to confirm that you're concerned and get the details explained to you if you think that these new rules apply to you.
What to do in HikaShop
First of all, you can download the Europe tax rules install Package.
It's a package which will add one tax rate for each European country (with the rate up to date), a tax category so that you can apply it to your products and tax rules linking the tax category, the tax rates and the countries based on the client type (individual, company, etc).
Please note that the tax rules have a starting date set on the 1st January 2015.
Install the tax rules package

- Log in to your Joomla backend
- Click on the Joomla menu: System >> Install >> Extensions.
- In the Upload Package File tab, drag the package you just downloaded onto the page, or click on Or browse for file and select it.
- The package is installed as soon as the file is chosen.
- The tax rates and rules are now added.
Adjust the configuration for your country
Since that tax package is for everyone, the tax rules are general. You'll want to edit the tax rules of your own country so that tax rate of your country applies regardless of the client type (while by default the tax rate only apply to individuals and companies without a VAT number).
Apply the new tax category to your products
You'll also want to change the tax category of all your products to the new tax category by creating a mass action.
First, you need to know the ID of the tax categories ; To see them, go in the "Manage tax categories" button of the tax rules page (System > Taxes).

The listing shows each tax category with its ID, the number you need in the mass action below.

Once you got the current tax ID and the next tax ID ; you can use a "mass action" in order to change the tax for all of your products.
Via the HikaShop menu System > Mass actions, select create a Product action.
The idea is to "update the values" of the "product_tax_id" column for the new tax category value when the product is using the old tax category.
So you need to filter the product with the ID of previous category tax for the "product_tax_id" and then to update it with the new one:
Remember that the tax rules have a start date set to the 1st of January 2015.
Floating tax prices
Finally, HikaShop 2.3.5 introduced a new option called "floating tax prices" that you can activate in the "Taxes" block of the "Main" tab of the HikaShop configuration.

When activated, HikaShop will use the price entered in the products as the price with taxes and will reverse calculate the taxes amount so that customers from different European countries will pay the same total price but a different amount of taxes corresponding to their country.
You do not necessarily need to use that option, but it can be handy to avoid having the prices changing between the product page and the checkout once the user enters his address and the system knows where the customer is from in order to charge his tax rate instead of the default tax rate.
Alternatively to that option, you can also configure the geolocation plugin of the Business edition to geolocate the customer's country based on his IP address until he enters his address, and thus allowing your website to display the correct prices to the customers in most cases, even before they enter their address.
Automatic tax calculations
The company PolishedGeek has been working for a few months on a solution to integrate HikaShop with the web service Avalara and should also be ready in the next few days. That solution will allow you to have your products taxes calculated automatically by Avalara based on the location of the customer. It will work with the European Union's new tax rules, but will also work for other countries.
What about the MOSS ?
Now that you have HikaShop configured to collect the appropriate tax for each customer, that you registered your company to the Mini One Stop Shop, you'll get orders with these rates, and you'll have to report the taxes you collected for each country to the MOSS.
Each country has decided to implement the MOSS in a different way. Some with an automated process with a specific format to transmit the data, some with a manual process, some with both.
The company Edwin2Win has developed an invoicing solution for HikaShop called HikaInvoices to handle invoicing in HikaShop and also handle everything related to the MOSS in your HikaShop online store. A first version is now available on http://hikainvoices.com
- Details
- Written by: Lavocat
- Category: Tutorials
- Hits: 17661
Here is a quick video tutorial which explains how to configure your checkout product with HikaShop.
- Details
- Written by: Lavocat
- Category: Tutorials
- Hits: 34403
|
|
Description
Thanks to this tutorial, you will be able to configure your products details page with a color selector.
The customer will be able to easily select his favorite color thanks to a preview of each color.
Then, we will see how to link each selectable color with the corresponding picture of your products. The aim is to see the products in different colors just by selecting a color.
Color setup
First of all, you need one small picture per color. Open the Joomla media manager (Content > Media), create a folder for them (here "colour-icons" inside the "images" folder) and use the Upload button of the toolbar to send your color icons. You can upload several files at once.
NOTE: You can find here, a link to an archive containing several color icons in png that you can use for this tutorial.
![]()
Here is a little tip, in order to make the next step easier: select an icon in the media manager and copy its URL (or its path) somewhere for later.
Display configuration
It's time to create your new characteristic. In the HikaShop menu, open the Products menu and select Characteristics.

Click on the "New" button of the toolbar in order to create your new characteristic. The existing characteristics are listed like this:

Type a name for your characteristic ("Colour swatch" here) and set its Characteristics selection method to "Radio Button", so that the customer sees all the colors at once instead of a dropdown. Then click on the Add button for each possible value of your characteristic.
The aim here is to have your color icons added as values of your characteristic, so the value is a small piece of HTML code which displays the icon. Use the URL of the icon you copied sooner:
<img src="http://www.yoursite.com/images/colour-icons/cornflower.png" alt="Cornflower" title="Cornflower" width="32" height="32"/>

Repeat the last operation for each color icon needed. The screenshot below shows your color icon(s) in the list of values.
NOTE: You must create only ONE "color characteristic" but with all colors needed on your website (like the picture below). Later in each product settings, you will be able to select the needed color(s) for that product.

You have now finished to create your characteristic. Its display is set by its own Characteristics selection method field. When this field is left on "Inherit", the global option is used instead: in the HikaShop Configuration, Display tab, Product options block, the Characteristics selection method option can be set to "Radio Button" for all your characteristics. Don't forget to save these settings after the change.

Time to configure the characteristic from your product settings. Go back to the HikaShop Products listing and click on the product for which you want a color selector.
In the Specifications block of the product, find the Characteristics field and click on the Add (+) button, then select your new characteristic, here: "Colour swatch". Save the product.

A "Variants" tab now appears in the product form. Click on the Variants tab, then on the "Add variants" button. Select one value of the characteristic for each variant you want to create (here one variant per color) and save. The variants are listed with their code, their color icon, price, quantity, and whether they are published or the default one.
Note : The Default column tells which variant is selected by default when customers reach the product page. Click on its icon to change the default variant. In the same way, click on the Published icon to unpublish a variant. To delete or duplicate variants, tick them in the list and use the buttons which appear above it.

Click on the pencil of a variant to edit it. The variant form is just like the product form: you will mainly notice the color icon of the variant in the Main options block, where you can also set the quantity of this color.

Right now, on the frontend product page, you will see your icon color selector like this:

Link icons and pictures
Now, onto the second step. You have your color icons selector displayed, and you want to show different product pictures linked with the color selector. Edit again your product, go to the Variants tab and click on the pencil of the variant you want to illustrate.
In the Images and files block of the variant, click on the first button to upload a picture from your computer, OR on the "+" button to pick a picture which is already on your website. The third button links a picture by its address.

NOTE : You can have several pictures for one variant, and remove a picture with the cross which appears on it. Don't forget to save!
Repeat these last actions for each variant so that all the variants of the product get their image.
That's it, on the product front end page, when you click on a color icon, the picture of the product will change to display the relevant one:

Create a filter thanks to characteristics
The filters are available from the Display menu of HikaShop, Filters entry. There, you have to create a new filter, so click on New.

Here, you have to do several things:
- Give a name to your new filter.
- Choose your type of filter. Here, you want to choose "Checkbox" (or "Radio Button" if the customer should pick one color at a time).
- In the Options block, choose to apply your filter on "Characteristics".
- And select your characteristic, here for example: "Colour swatch".
- Finally, in "Extra information", switch on "yes" the "Submit on click" option.
- And Save.

- To display the filter on your products listing, publish a HikaShop Filter Module (Joomla Content > Site Modules) in a position of your template. With its "Filters" option left on "All", it displays all your published filters. Later, you will be able to edit the filter, unpublish it or delete it.
Right now, on the products listing pages, customers will see all the characteristic color icons, like this :

And when they will pick a color, the product(s) available with this color (or variants) will be listed. Here, only one product matches with this color :

- Of course, the example is working with color icon characteristics, but all sort of characteristics can be set like size, type of product etc...So it's very usefull!
Maybe the look of this page disappoints you, especially if there are lots of different variants...Good way to speak about CSS customization !
How to customize the display
All starts with the HikaShop Configuration page. Click on the Display tab (be careful not to go on the Display menu), and select the CSS options block.

Here, you can edit the CSS just by clicking on the little pen button next to the "Front-end CSS File" dropdown. A window opens where you can read and customize the CSS. If you do some modifications, don't forget, as usual, to save them !

You will see that your custom CSS will then be selected automatically in the Front-end CSS File dropdown. Save the main configuration too.
Example of custom CSS
Now that we saw how to customize the CSS, we will see some examples of useful CSS modifications to optimize for example, your new color icons characteristic selector !
First, the display color in the product page. Before, the selector looks like this:

In order to change this add at the end of the Css file :
.hikashop_product_characteristics_table input {display: none;}
.hikashop_product_characteristics_table .form-check {padding-left: 0;}
.hikashop_product_characteristics_table label img {border: 2px groove black; padding: 2px; margin: 2px;}
.hikashop_product_characteristics_table input:checked + label img {border: 2px solid red;}
Edit and Save the Custom CSS and...
Result:

And now for the products listing page, the filter display. Before:

Just add this at the end of the Css file:
.hikashop_filter_checkbox + br {display: none;}
.hikashop_filter_checkbox {display: inline-block;}
.hikashop_filter_checkbox label img {border: 2px solid black; display: inline-block !important; margin: 4px;}
.hikashop_filter_checkbox input {display: none;}
.hikashop_filter_checkbox input:checked + label img {border: 2px solid red;}
Note : you can replace the "red" command for your required color, green, blue or rgb(40, 244, 244) by example.
Result :

