Category problem and gif

Solved
azimbek-esanov

Jan 16th, 2018 09:08 AM

Hi Tony! I bought script about 2 weeks before. I have two questions for you 1. I created new category but I can't add product to it, also it doesn't connect another categories 2. *.gif file doesn't work on the Main paneI Can you help me please

faithfully Azimbek

azimbek-esanov

Jan 16th, 2018 12:36 PM

Yes category problem is the same but I have second issue *.gif file doesn't work on the Main panel

devdojo

Jan 20th, 2018 02:30 AM

As far as the category issue you will need to add a new row in your categories table called parent_id which is a Type INT, and you can check the Allow NULL field. After doing this you should be good to go with the categories issue. I'm going to put a fix out for this in the latest version.

Can you tell me the problem you are having with the .GIF, I'm able to upload gifs just fine: You can checkout this post here: http://app.ninjamediascript.com/testing-gif

Let me know and I can help out further with that. Thanks.

@sergio-uria, I'm going to be sending you a message here shortly to help you out. Thanks.

azimbek-esanov

Jan 22nd, 2018 11:45 AM

@devdojo I tried by category issue but they don't work I can't add any category to new product. Also I opened new category "Pet stuff" but I can't delete it. please check http://belovelyday.net/category/gear-gadgets "Pet stuff" category problem is same with the @sergio-uria About GIF Can you check this product "Pet dog washer 360 degree" I uploaded 345x288 *.gif file to it but it doesn't work on the main page.

Please help

devdojo

Jan 22nd, 2018 04:06 PM

@azimbek-esanov, can you send me a private message here: https://codecanyon.net/user/devdojo with your FTP and admin info and I can help you out with your issue :)

Thanks! Talk to you soon.

azimbek-esanov

Jan 22nd, 2018 04:17 PM

I sent FTP and Admin panel info please check

azimbek-esanov

Jan 23rd, 2018 06:06 PM

Hi @devdojo! Did you check them? please reply

devdojo

Jan 23rd, 2018 10:34 PM

Best Answer

Ok, you should be good to go now.

You need to delete the category from category_menu of the Menu Builder. Click on Builder and then delete that category and it will no longer be on the left category menu.

I've also fixed the GIF image display. This was a change that needed to happen in the theme file, located at: themes/default/includes/product.blade.php

by changing line 18 from:

<a href="{{ $product->link() }}" target="_blank"><img src="{{ Voyager::image($product->get_cropped_image()) }}" alt="{{ $product->title }}"></a>

to the following:

@php $ext = pathinfo($product->image, PATHINFO_EXTENSION); @endphp
            
@if($ext == 'gif')
    <a href="{{ $product->link() }}" target="_blank" style="position:relative; width:100%; height:100%; display:block;"><img src="{{ Voyager::image($product->get_cropped_image()) }}" alt="{{ $product->title }}">
        <span style="background-image:url({{ Voyager::image($product->image) }}); width:100%; height:100%; background-size:cover; position:absolute; left:0px; top:0px; display:block;"></span>
    </a>
@else
    <a href="{{ $product->link() }}" target="_blank"><img src="{{ Voyager::image($product->get_cropped_image()) }}" alt="{{ $product->title }}"></a>
@endif

 @if($title_location == 'bottom')
    <h4 class="card-title bottom"><a href="{{ $product->link() }}" target="_blank">{{ $product->title }}</a></h4>
@endif

 @if($title_location == 'bottom')
    <h4 class="card-title bottom"><a href="{{ $product->link() }}" target="_blank">{{ $product->title }}</a></h4>
@endif

I will be adding this to the main theme file, and I will put those inline styles into the stylesheet instead of the HTML.

Let me know if you have any other questions and mark this topic as solved if this is the answer that helped you out.

Thanks!

azimbek-esanov

Jan 24th, 2018 05:43 PM

Thank you for GIF issue solved

:-( when I delete category from category_menu of the Menu Builder is not deleted It geves error! SQLSTATE[42S02]: Base table or view not found: 1146 Table 'belovel4_script.translations' doesn't exist (SQL: delete from translations where translations.foreign_key = 44 and translations.foreign_key is not null and table_name = menu_items and locale in (en) and column_name = title)

Also Second issue is same with @sergio-uria

{ Yes, but what I mean is that when I update a product to change the category, it is not updated or added, see these screenshots: https://devdojo.com/forums/discussion/product-support/error-when-add-or-update-product-in-category }

Please check all screenshots, are same with my issue. I checked @sergio-uria's discussion. This issue has not solved yet?

devdojo

Jan 26th, 2018 12:47 AM

Great. Thanks. Glad the GIF issue got resolved. Can you mark the previous post as Solved answer and I will look into the new URL for the previous error in the link you provided. Thanks :)