Jump to content

module development


ziemien
 Share

Recommended Posts

I need to create a module that will add check box into product page in admin panel, saves whether it has been checked or not into database and if it has, adds small box in the product page in front end with some information about showed product like its dimensions.

 

It's seems to be so simply but when I've looked into Prestashop files I got lost. There is so much code.

 

The question is where I should start ? Do you know any tutorials that might be helpful? I've looked into dev documentation but it does not solve my problems. Which files should I edit?

Edited by ziemien (see edit history)

Share this post


Link to post
Share on other sites

If I understand your problem correctly, it doesn't seem to me like you need an extra module for this.

 

Prestashop Products have attributes like dimensions already, they're called "features".

 

Maybe instead of a checkbox just setting those dimensions in the admin products features and then adding something like

{if isset($features)}
<div id="small-box">
  {foreach from=$features item=feature}
       {if $feature.name == 'Width'}
            {$feature.value} x
       {/if}
       {if  ($feature.name == 'Height')}
            {$feature.value}
       {/if}
   {/foreach}
</div>
{/if}

in themes/YOURTHEME/product.tpl. would already be enough for your needs?

Edited by defuzed (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More