Jump to content

dwojod

Members
  • Posts

    38
  • Joined

  • Last visited

Profile Information

  • Location
    poland
  • Activity
    Freelancer

dwojod's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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); } }
  2. 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.
  3. thank you vekia, but that does not solve the problem, I have to find a way, how to run my method during add product to the order. I think about actionCartSave, but I can't find any common key after which it could refer to the order. thanks for the advice
  4. Hi How is called the hook for the action product was added to an existing order in the BO? I want to run some method in my module in this action.
  5. if you want to display something or do something else on page should use the construction of a conditional {if $ page_name == 'index'} else {...} ... {/ if} the same would happen in the case of a category page, product, etc. I'm glad I helped;)
  6. 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>
  7. 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. 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 ?
  9. 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 ?
  10. 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
  11. 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 ?
  12. 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 ?
  13. 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.
×
×
  • Create New...