Jump to content

Tag cloud for prestashop 1.7.X


 Share

Recommended Posts

  • 3 weeks later...
  • 2 weeks later...

Thank you w3bsolutions. For some reasons the tag cloud won't show up on the category page even though it is hooked to the left column. Actually I think prestashop 1.7 is not ready for use yet.

 

Only on the category page? it shows up fine on other pages? I tested and it was showing ok everywhere.

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Attached is a tags block for PS 1.7 (just 1.6 version adapted to make it work in 1.7 and match with classic theme).

 

Cheers.

Hi w3bsolutions

 

I've just installed your module, it works but displays all the tags on a column, do you have any version where tags are spreaded in the box?

 

Thanks in advance,

 

Simone

Share this post


Link to post
Share on other sites

Hi w3bsolutions

 

I've just installed your module, it works but displays all the tags on a column, do you have any version where tags are spreaded in the box?

 

Thanks in advance,

 

Simone

 

Are you using custom template? It was adapted to spread in the box with default template. You can just modify the css to match your needs.

Share this post


Link to post
Share on other sites

Are you using custom template? It was adapted to spread in the box with default template. You can just modify the css to match your needs.

 

I'm using another template, you can see the result of my tests here: cobutokyo.com

 

Can you please suggest me how to use CSS to create random tags displacement? I would be grateful.

 

Thanks in advance,

 

Simone

Share this post


Link to post
Share on other sites

  • 7 months later...

I'm testing configuration of Prestashop 1.7 (axactly on 1.7.2.2 version).

a) I've just installed blocktags module. First strange thing - after installing it - my layout configuration for index and product page changed from two columns version again to deafult full width option... hm ;) Nevermind. I changed this again and it works.

B) I assigned this module to hook displayLeftColumn. Why there is no option to assigned this module also to displayLeftColumnProduct hook? How to acheive this?

c) A little funny... maybe it's solutions for someone who have problem with displaying this module at front ;) At the begginig I thought that it not works because any tags appeard in my left column. I'm just testing raw Prestashop installation with oryginal demo data. And in default test products have no tags :P It's enough to add any in any product :) Maybe this help someone ;)

Thank you for adapting this module for PS 1.7!

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 1 month later...

The BEST solution is The Amazzing Filter. Installed it on a client's site and it is the best filtering option ever! I know this was for a Tag Cloud, but when I saw the mention for filtering options in PrestaShop 1.7, I found your post and thought it wouldn't hurt to recommend. You don't need a Tag Cloud with The Amazzing Filter. You can get it from the PS Add-Ons marketplace.

Share this post


Link to post
Share on other sites

  • 1 month later...
  • 2 weeks later...

I made a modification to keep tags when searching.

Here are the files modified.

modules/ps_searchbar/ps_searchbar.php

After:

        if (!array_key_exists('search_string', $this->context->smarty->getTemplateVars())) {
            $widgetVariables['search_string'] = '';
        }

Add:

        if (!array_key_exists('search_tag', $this->context->smarty->getTemplateVars())) {
            $widgetVariables['search_tag'] = '';
        }

themes/classic/modules/ps_searchbar/ps_searchbar.tpl

After:

<input type="hidden" name="controller" value="search">

Add:

<input type="hidden" name="tag" value="{$search_tag}">

 

  • Like 1

Share this post


Link to post
Share on other sites

  • 4 months later...

If you don't want duplicate tags with groups enabled then you will need to override the getMainTags.

In override/classes I created a Tag.php file and have

<?php

/**
 * Class TagCore
 */
class Tag extends TagCore
{

    /**
     * Get main tags
     *
     * @param int $idLang Language ID
     * @param int $nb     number
     *
     * @return array|false|mysqli_result|null|PDOStatement|resource
     */
    public static function getMainTags($idLang, $nb = 10)
    {
        $context = Context::getContext();

            return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
            SELECT t.name, counter AS times
            FROM `'._DB_PREFIX_.'tag` t
            LEFT JOIN `'._DB_PREFIX_.'tag_count` pt ON (t.id_tag = pt.id_tag)
            WHERE pt.id_group = 0 AND pt.`id_lang` = '.(int) $idLang.' AND pt.`id_shop` = '.(int) $context->shop->id.'
            ORDER BY times DESC
            LIMIT '.(int) $nb);
        
    }
    
}

removed /app/cache/prod/class_index.php for the override to work

Edited by TinyStore
Changed query to only show active tags (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 1 year later...
  • 3 weeks later...
  • 10 months later...

Thankyou so much for this module.

I have installed and all works fine but I cannot seem to get randomize to work correctly.

I am using ps 1.7.6.7.  I have tried clearing cache, in case that made a difference, but still no change to the order.

I manually adjusted the code in the php so "&& Configuration::updateValue('BLOCKTAGS_RANDOMIZE', true)".  This had an effect of changing the order, but still stays in this new order.  Not sure why as it was just the configuration section.

 

Any ideas please ??

Edited by Maldon Jewellery (see edit history)

Share this post


Link to post
Share on other sites

  • 3 months later...

Hello @Zohaib-fk

Just tried your site and refreshed the paged a number of times but the order of the tag cloud list doesn't change at all.

I am trying to get the randomise to work correctly.  

If anyone has any ideas then please let me know.

 

Share this post


Link to post
Share on other sites

  • 1 month later...
Posted (edited)

I purchased this module yesterday @ZHSoft "Advanced Product Tags Pro | SEO internal link promotion Module" and does a great job.

I was apprehensive at first, and the first version of the module saved the tags after saving the product.  I pointed out to the developer that it was not very automated and within a few hours they had added functionality to make it automated and a one click solution.

My server is a shared server and very slow and they suggested a change and today was version 1.0.3 which has just finished creating all the tags.

Thanks for the great assistance and help.

 

Edited by Maldon Jewellery (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...
On 5/28/2021 at 10:52 PM, Maldon Jewellery said:

I purchased this module yesterday @ZHSoft "Advanced Product Tags Pro | SEO internal link promotion Module" and does a great job.

I was apprehensive at first, and the first version of the module saved the tags after saving the product.  I pointed out to the developer that it was not very automated and within a few hours they had added functionality to make it automated and a one click solution.

My server is a shared server and very slow and they suggested a change and today was version 1.0.3 which has just finished creating all the tags.

Thanks for the great assistance and help.

 

Yes, as I said, we are transferred to PrestaShop developers, we have a strong technical support team and agile response capabilities.
A very pleasant cooperation~

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