Thursday, 11 April 2024

How to move product tabs below main picture in PrestaShop

Hi i have been looking at your post and up dates i was wondering if you know how to change sides of product description of the classic theme in Prestashop. Best Regards Lee


Okay, all is clear
this case requires modification of theme .tpl file: themes/your-theme/templates/catalog/product.tpl
there is a code like

            {block name='product_tabs'}
<div class="tabs">
<ul class="nav nav-tabs" role="tablist">
{if $product.description}
<li class="nav-item">
<a
class="nav-link{if $product.description} active js-product-nav-active{/if}"
data-toggle="tab"
href="#description"
role="tab"
aria-controls="description"
{if $product.description} aria-selected="true"{/if}>{l s='Description' d='Shop.Theme.Catalog'}</a>
</li>
{/if}
<li class="nav-item">
<a
class="nav-link{if !$product.description} active js-product-nav-active{/if}"
data-toggle="tab"
href="#product-details"
role="tab"
aria-controls="product-details"
{if !$product.description} aria-selected="true"{/if}>{l s='Product Details' d='Shop.Theme.Catalog'}</a>
</li>
{if $product.attachments}
<li class="nav-item">
<a
class="nav-link"
data-toggle="tab"
href="#attachments"
role="tab"
aria-controls="attachments">{l s='Attachments' d='Shop.Theme.Catalog'}</a>
</li>
{/if}
{foreach from=$product.extraContent item=extra key=extraKey}
<li class="nav-item">
<a
class="nav-link"
data-toggle="tab"
href="#extra-{$extraKey}"
role="tab"
aria-controls="extra-{$extraKey}">{$extra.title}</a>
</li>
{/foreach}
</ul>

<div class="tab-content" id="tab-content">
<div class="tab-pane fade in{if $product.description} active js-product-tab-active{/if}" id="description" role="tabpanel">
{block name='product_description'}
<div class="product-description">{$product.description nofilter}</div>
{/block}
</div>

{block name='product_details'}
{include file='catalog/_partials/product-details.tpl'}
{/block}

{block name='product_attachments'}
{if $product.attachments}
<div class="tab-pane fade in" id="attachments" role="tabpanel">
<section class="product-attachments">
<p class="h5 text-uppercase">{l s='Download' d='Shop.Theme.Actions'}</p>
{foreach from=$product.attachments item=attachment}
<div class="attachment">
<h4><a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">{$attachment.name}</a></h4>
<p>{$attachment.description}</p>
<a href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}">
{l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
</a>
</div>
{/foreach}
</section>
</div>
{/if}
{/block}

{foreach from=$product.extraContent item=extra key=extraKey}
<div class="tab-pane fade in {$extra.attr.class}" id="extra-{$extraKey}" role="tabpanel" {foreach $extra.attr as $key => $val} {$key}="{$val}"{/foreach}>
{$extra.content nofilter}
</div>
{/foreach}
</div>
</div>
{/block}

 
you need to move this code. you just have to paste it right after this code:
(this code starts near ~55 line and ends near ~71 line) 

        {block name='page_content_container'}
<section class="page-content" id="content">
{block name='page_content'}
{include file='catalog/_partials/product-flags.tpl'}

{block name='product_cover_thumbnails'}
{include file='catalog/_partials/product-cover-thumbnails.tpl'}
{/block}
<div class="scroll-box-arrows">
<i class="material-icons left">&#xE314;</i>
<i class="material-icons right">&#xE315;</i>
</div>
{/block}

 
the effect will be like

 

Saturday, 6 April 2024

How to save google merchant feed to xml file

Hello

I purchased your google merchant center feed module and i wonder how i can save feed to xml file and update it with cron job to update products in google? 



 

 

Hello
module workflow allows to generate and share feed in several ways. 
 
  1. save feed to .xml file,
    when this option is active: https://i.imgur.com/2FAjtL8.png 
    each time you will run cron task with url (long or short that after save is available here: https://i.imgur.com/poGlPmn.png ) generated by module feed will be saved here:
    products: http://your-domain.com/modules/gmfeed/products.xml 
    combinations: http://your-domain.com/modules/gmfeed/combinations.xml 
  2. feed downloaded in back office
    When you save feed settings you can use "save and export" button: https://i.imgur.com/DGIGxLg.png 
    feed will be generated and downloaded to your computer
  3. feed available on-line (by url)
    when this option is DISABLED: https://i.imgur.com/2FAjtL8.png 
    the url to feed that module generates (both long url and short) can be used to generate and download the feed
 
 
What option to use?
it depends on your requirements.
if you expect to create scheduled fetch (google will conntect to feed, download it and update products) i recommend to use last option (3).
just use the feed generation url in google merchant data source settings and this should be enough.

Friday, 5 April 2024

How to hide products for a group of customers?

 

Hello
I have bought your "Access to Products" module but i do not know how to use it. I just expect to hide products from groups other that wholesaler and b2b (i have to additional grups of customers). How can I hide a product for a rest of groups of customers?


Hello
if you expect to hide product, by "hide" i mean:
  • disable product page for selected group (product page will not be visible)
  • disable product in catalog (search results list, category products list, supplier's products list etc.)
 
you will need to configure module in two sections (firstly you define what you expect to do, in second step you point what groups will not see selected products)
 
firstly:
go to module configuration page (under modules > modules manager https://i.imgur.com/ITwbMAz.png ) 
you can find there options what to do: https://i.imgur.com/P5SXzpN.png just activate option to "hide product page" and "Block purchase product"
thanks to these options you will disable product page and disable possibility to purchase it for selected groups
 
if you expect to hide products in catalog (search results , other lists of products like product form manufacturer, supplier etc.) you need to open this section: https://i.imgur.com/pPmw47W.png 
activate there option to hide products in catalog. 
 
 
Now in second step we have to point what groups of customers should not see selected product(s).
you can do it directly on product edit page. Just open edit page of product that you expect to hide,
then go to "modules" tab and click on "configure" near the module: https://i.imgur.com/Rf0H8qo.png
you can find there list of customer groups. Point there groups that will not see product in products catalog, product page and will not have possibility to purchase it. Then just save settings :)
for example: https://i.imgur.com/DAeKXrB.png  
 
 
If you expect to set these settings in bulk for many products, you can do it on module configuration page in section where you can massively set configuration of many products: 

 

 
if you have some more questions feel free to write
milosz