Skip to content
View in the app

A better way to browse. Learn more.

Clicshopping AI, Free generative artificial intelligence e-commerce Open Source , Open Source Store Onlne

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Add new element inside product new

Featured Replies

Hello @FrediKa,

 

I think you have miss something when ou read the documentation :

Quote

if you need more informations, you must create a new template and use this syntax

 

In this case, it's recommended to create a new template and to include your modification, but not inside the original template.

I suppose this approach is made if there is an update about this template.

You have 2 choice

1 - Create a new template inside template_html directory and call after across the options

2 - Create a new products_new.php with your option and call your template if the first doesn't allow you to make what you want.

  • Author

Ok,

I have changed inside  template_bootstrap_column_5.php

How to make another module with this own template ?

@FrediKa,

There an example.

 

the process:

edit

fp_new_products.php

rename in

fp_my_file.php

 

Inside
replace

 fp_new_product

by

fp_my_file

replace :

front_page_new_products 

by

front_page_my_file

replace :

FRONT_PAGE_NEW_PRODUCTS

by

FRONT_PAGE_MY_FILE

 

eventually you can change the template directory :

'/template_html/' . MODULE_FRONT_PAGE_NEW_PRODUCTS_TEMPLATE 

by

 '/template_html/' . MODULE_FRONT_PAGE_MY_TEMPLATE_DIRECTORY

 

Do not forget to change the language
Do not forget to change the css


Now you are ready to implement your code.

 

This is a short cut to help you how to make a new template_html with a template directory but you can use also the default template_html

 

Now do not forget to include your new contribution inside the Default template and also in your new template directory. Like that you can change everything without to change anything inside the default template directory.

Why you must include your new contribution in the Default directory and not only the new template directory ?
It's the DB initialization is made by default inside the  Default directory.
Like all the module are overridden in function the Default Directory, you have no choice to include the new element inside the Default directory.

It's the limitation.
I hope it's not little too complex, but after one or to test, you will understand the process.

 

 

 

 

Ok,

Thank @ClicShopping fir this explanatio. I understand better why  it's important to make another template directory.

Sincerely, I does'nt make that on test site, I think I will try and take this orientation.

  • Author

Ok, it's a little complex for a newbie like me, I must practice a little. As you said, it's better to create another file and change why we need inside. 

3 minutes ago, FrediKa said:

Ok, it's a little complex for a newbie like me, I must practice a little. As you said, it's better to create another file and change why we need inside

 

As I understand, yes it's better, and you reduce the maintenance. But I want to say, if there an upgrade, your file can be impacted if there is inside the core an evolution.

But it's the same for all software.

I suppose we will have a note if something happens to let the time to take this in consideration.

  • 2 weeks later...
  • Author

I have a question about to create a new template ? I must copy every file or I can take just the files I need. I test just one or two files, it seems work.

Tk

Hello,

Looking a little the code after my first installation.
I think you can choose only the files like you want to insert a new template. but about the css, you must copy all inside the new template.

But like it's my first reaction, I forgot something. Maybe someone has more knowledge can write more about that.

@Ronaldo

Yes, you have right, some files can be overridden inside a new template. But all the modules must be also in the default template because the system read in first the default template and install the element in the bd.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.