Quote

We're also available for Custom Joomla Development

Hire us now
MAdmin1995 on Monday, January 08 2018, 11:41 AM

Dealicious Gallery Items

Hi Guys

Hope you can help. I bought the Dealicious Template quite a while back but never used the website.
I finished the website when I bought it though and everything was working wonderfully.

Recently though I noticed I am no longer able to use the Gallery Items feature when creating a new post or even editing an old one.
What happens is when I go to "Content -> Articles -> New Article everything works and I can add images in the Content & Images and links tabs, but when I get to the Deal Settings Tab and click on the Gallery Items option, it opens up a modal when I can add the main image and the thumbnail. But when I try to use the "select" option or even the "X" option to clear the selection nothing happens. It doesn't open up anything leaving me unable to select the image.

This is odd because I assume the same method for selecting images are used in the Image and links Tab.

Really stuck on this. I don't get any errors when loading the page or when I click the button. When I inspect the button using chrome and click on it nothing happens either with no warnings.

Don't know if I'm just doing something wrong but I believe it might be an issue due to the Joomla update I made.
Im currently on 3.8.3 but it did the same on 3.7.2. Never had the issue when I was running lower than 3.7.

Any help would be super appreciated.

Please see below image to see where I'm having issues.
I am able to use the add and remove options but cant select or clear the image.

Kindest Regards
Martin Pretorius

https://i.imgur.com/s9f7xjo.png
Resolved
The discussion has been resolved.

Accepted Answer

  • Replied by admin on Thursday, January 11 2018, 07:58 AM
    Hi Martin,
    I have updated the package so you can now re-download it : https://www.templateplazza.com/items/dealicious-joomla-template
    If you want to update it manually (in case you have modified the template) please follow the following steps :

    1. Download the updated file from : https://www.templateplazza.com/items/dealicious-joomla-template and extract it into your computer.
    2. After you have extracted it you will see the file setup/pkg_dealicious_1.1.zip. Extract it again.
    3. Install the file setup/pkg_dealicious_1.1/packages/plg_dealicious.zip via joomla administrator page.
    4. Then open file ../templates/dealicious/html/com_content/article/dealicious.php with your favorite php editor
    at line 121-135 you will see this code :
    //gallery items
    $gallery_items = $attributes->list_gallery_items;
    $gitem = json_decode($gallery_items, true);
    function group_by_key($array) {
    $result = array();
    foreach ($array as $sub) {
    foreach ($sub as $k => $v) {
    $result[$k][] = $v;
    }
    }
    return $result;
    }
    if (!empty($gallery_items)) {
    $filtered_array = group_by_key($gitem);
    }



    change that to

    //gallery items
    $gallery_items = $attributes->list_gallery_items;


    then at lines 220 - 230 you will see this code :
    <?php
                            // gallery items
                            foreach ($filtered_array as $index => $value): ?>
                            <li class="uk-width-1-3 uk-width-small-1-4 uk-width-medium-1-5">
                                <a href="/<?php
                                    echo $value[0]; ?>" data-lightbox-type="image" data-uk-lightbox="{group:'dealgallery'}" title="<?php echo $value[2]; ?>">
                                    <img src="/<?php echo $value[1]; ?>" />
                                </a>
                            </li>
                            <?php
                            endforeach; ?>



    change that to

    <?php 
                            // new gallery items using subform
                            foreach ($gallery_items as $item) : ?>
                            <li class="uk-width-1-3 uk-width-small-1-4 uk-width-medium-1-5">
                                <a href="/<?php echo $item->img; ?>" data-lightbox-type="image" data-uk-lightbox="{group:'dealgallery'}" title="<?php echo $item->imgtitle; ?>">
                                    <img src="/<?php echo $item->imgthumb; ?>" alt="<?php echo $item->imgtitle; ?>"/>
                                </a>
                            </li>
                            <?php endforeach; ?>



    Hope this helps

    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
     
  • Replied by MAdmin1995 on Wednesday, January 10 2018, 06:53 AM · Hide· #1
    Hi,

    Thanks for the reply.
    Glad to hear its not something I did wrong.

    Do you have an ETA on a fix? Really trying to get the site out as soon as possible.

    Thanks again.
    Kindest Regards
  •  
  •  
    Replied by admin on Tuesday, January 09 2018, 02:24 PM · Hide· #2
    Hi Martin, We're working on the fix. Please stay tuned
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments