Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How to use hooks

 
  • raganello
  • Member
  • Members
  • Join Date: 19-Dec 12
  • 30 posts

Posted 28 October 2013 - 08:58 AM #1

Hello I can't figure out how to make hooks run in twigmo.

Tha path for css in the file styles.post.tpl is /stores/1/skins/basic/customer/addons/twigmo/styles.css

I am using cs cart 3 ultimate...

Any suggestion?

thanks a lot!

 
  • 2tl
  • Architect
  • Twigmo team
  • Join Date: 03-Dec 09
  • 230 posts

Posted 30 October 2013 - 12:09 PM #2

Hello,

Please let me explain how hooks work.

The base template for forming the desktop version is the file stores/1/skins/basic/customer/index.tpl.
It includes the file styles.php located at stores/1/skins/basic/customer/common_templates/styles.tpl.
{include file="common_templates/styles.tpl" include_dropdown=true}

This hook is defined in the file styles.tpl
{hook name="index:styles"}{/hook}

Hooks are automatically processed by CS-Cart, and if need be, they include additional add-on files including Twigmo. You can learn more about hooks from http://docs.cs-cart.com/hooks.

If the Twigmo add-on is set and enabled, the hook will have the additional file /stores/1/skins/basic/customer/addons/twigmo/hooks/index/styles.post.tpl included, in its turn this file includes the styles file /stores/1/skins/basic/customer/addons/twigmo/styles.tpl.

These styles are used only for the desktop site version.


If you wish to change styles for the mobile site version, it is necessary to edit the file /stores/1/skins/basic/customer/addons/twigmo/custom_{your_twigmo_skin_name}.css . Instead of "{your_twigmo_skin_name}" specify the name of your Twigmo skin (for example, basic, handbag).

The base template for the mobile version is located at /stores/1/skins/basic/customer/addons/twigmo/mobile_index.tpl.


Hooks for extending the functionality are not provided for in the Twigmo add-on, in other words other add-ons cannot extend the functionality of the Twigmo add-on.


Feel free to ask any questions.

Thank you.
Ilya Kolesnikov,
Twigmo team
[size=2]Ex-CS-Cart Architect Team[/size]

 
  • Guest_Hoko_*
  • Guests

Posted 30 April 2014 - 02:50 PM #3

How it works the hooks with the Twigmo 3.4 / CS-Cart 4.1x?

 
  • antev
  • Architect
  • Twigmo team
  • Join Date: 07-Oct 10
  • 110 posts

Posted 05 May 2014 - 07:57 AM #4

Hello,

How it works the hooks with the Twigmo 3.4 / CS-Cart 4.1x?


Please specify what for you would like to use hooks in Twigmo.

Visual Editor is available in Twigmo 3.x, using it you will be able to easily change the appearance of your store. Also, there is the "Custom CSS" section in Visual Editor, there you can enter any CSS code. So there is no need to use hooks for changing the appearance of the mobile version of your store.
Evgeniy Antonov,
Twigmo team

 
  • Hoko
  • Member
  • Members
  • Join Date: 26-Mar 11
  • 101 posts

Posted 05 May 2014 - 03:31 PM #5

Hello,
I need to add a button/link in the product page below the price to a contact form.
How can i do this?

Hoko

 
  • antev
  • Architect
  • Twigmo team
  • Join Date: 07-Oct 10
  • 110 posts

Posted 06 May 2014 - 07:42 AM #6

I need to add a button/link in the product page below the price to a contact form.
How can i do this?


Unfortunately, it is not possible to make such changes. Twigmo is designed as a service and does not support modification of templates. I am sorry.
Evgeniy Antonov,
Twigmo team