-
Posts
38 -
Joined
-
Last visited
Profile Information
-
Location
poland
-
Activity
Freelancer
dwojod's Achievements
Newbie (1/14)
0
Reputation
-
ok, i found a solutions: bulkaction send parametr as array, I try send int variable, and my method doesm;t work $row_array = Tools::getValue($this->table.'Box'); if (count($row_array)) { foreach ($row_array as $id_gallery) { CategoryGalleryModel::deleteGallery((int)$id_gallery); } }
- 1 reply
-
- delete
- submitBulkdelete
-
(and 1 more)
Tagged with:
-
Hello, in my module, in controller I want to delete object and I do it using bulk actions: $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'icon' => 'icon-trash', 'confirm' => $this->l('Delete selected items?') ) after this action I want to delete other row in database in second table of module using method created in Model, I don't know how to do it. I try conditional statement but it doesn't work if(Tools::isSubmit('submitBulkdelete'.$this->table) || Tools::isSubmit('delete'.$this->table)) or if(Tools::getIsset('submitBulkdelete'.$this->table) If I delete one row, my method works.
- 1 reply
-
- delete
- submitBulkdelete
-
(and 1 more)
Tagged with:
-
Footer width problem
dwojod replied to daavtecnologias's topic in Addons, modules and themes developers
Can you show URL page? -
You have to edit header.tpl file --> /themes/your-theme/header.tpl Cut this code: {capture name='displayBanner'}{hook h='displayBanner'}{/capture} {if $smarty.capture.displayBanner} <div class="banner"> <div class="container"> <div class="row"> {$smarty.capture.displayBanner} </div> </div> </div> {/if} And paste before close </header>
-
Override category controller in module
dwojod replied to dwojod's topic in Addons, modules and themes developers
My module is already finished. To edit and display saved data I used hookDisplayBackOfficeCategory. All functionality has been written using the appropriate hooks. jllramos thank for your help- 8 replies
-
- controller
- addtodatabase
-
(and 5 more)
Tagged with:
-
Override category controller in module
dwojod replied to dwojod's topic in Addons, modules and themes developers
I decided to create a new table. I added a new field to the category controller, and in the main file adds data to the database method "hookActionCategoryAdd" public function hookActionCategoryAdd($params) { $switch = Tools::getValue( 'switch' ); $insertData = array( 'id_category' => $params['category']->id, 'value' => $switch ); DB::getInstance()->insert('pmcategorylast', $insertData); } The question is: how to display the saved data when I edit category, I mean how can I edit in the back office ?- 8 replies
-
- controller
- addtodatabase
-
(and 5 more)
Tagged with:
-
Override category controller in module
dwojod replied to dwojod's topic in Addons, modules and themes developers
Thanks alot for a very useful information - now I can start work with my module there is something insistent - what happens to the original table when I do update the shop ?- 8 replies
-
- controller
- addtodatabase
-
(and 5 more)
Tagged with:
-
Override category controller in module
dwojod replied to dwojod's topic in Addons, modules and themes developers
Thanks a lot, but It could be better If I know how to do this other thing is use these values to display left column depends to value- 8 replies
-
- controller
- addtodatabase
-
(and 5 more)
Tagged with:
-
Hi, I want to extend category controller of a field of type "switch" - [value = 1 or 0] My questions: 1. Can I create new table in database with id, id_category, value, do I have to unconditionally enter additional values to the table ps_category ? 2. If I can make it through another table, how can I save these values using overwriting the controller ?
- 8 replies
-
- controller
- addtodatabase
-
(and 5 more)
Tagged with:
-
Hi, I want to extend category controller of a field of type "switch" - [value = 1 or 0] My questions: 1. Can I create new table in database with id, id_category, value, do I have to unconditionally enter additional values to the table ps_category ? 2. If I can make it through another table, how can I save these values using overwriting the controller ?
- 1 reply
-
- addtodatabase
- database
- (and 4 more)
-
Hi ver 1.6 after '{if $have_image}' - line 80 - add this code {foreach from=$images item=image name=bigImg key=i} {if $smarty.foreach.bigImg.iteration == 2} {assign var=imageLegendCover value=$image.legend|escape:'html':'UTF-8'} {assign var=imageIdCover value=$image.id_image} {/if} {/foreach} then you should change variable $cover.legend - $imageLegendCover $cover.id_image - $imageIdCover <span id="view_full_size"> {if $jqZoomEnabled && $have_image && !$content_only} <a class="jqzoom" title="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $imageIdCover, 'thickbox_default')|escape:'html':'UTF-8'}"> <img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $imageIdCover, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/> </a> {else} <img id="bigpic" itemprop="image" src="{$link->getImageLink($product->link_rewrite, $imageIdCover, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" width="{$largeSize.width}" height="{$largeSize.height}"/> {if !$content_only} <span class="span_link no-print">{l s='View larger'}</span> {/if} {/if} </span> and the last thing: thumbnails {if $smarty.foreach.thumbnails.iteration != 1} <li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}> <a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}[spam-filter]/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal[spam-filter]{/literal}"{else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" data-fancybox-group="other-views" class="fancybox{if $image.position == 2} shown{/if}"{/if} title="{$imageTitle}"> <img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}"{if isset($cartSize)} height="{$cartSize.height}" width="{$cartSize.width}"{/if} itemprop="image" /> </a> </li> {/if} In the BO you have to remember, when you add pictures to the gallery - first there must be cover.
- 9 replies
-
- product cover image
- remove cover image on gallery
-
(and 1 more)
Tagged with: