This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Greed95

  • **
  • 8 posts
no-image.png with different picture
« on: March 11, 2018, 03:31:38 PM »
I have some question..

I want to make a different picture for each category "no-image.png"
Is this possible to do it?

I apologize for English
« Last Edit: March 13, 2018, 04:45:11 PM by Greed95 »

*

MB Themes

Re: no-image.png with different picture
« Reply #1 on: March 11, 2018, 08:11:28 PM »
@Greed95
Replace this image with your own, remember it's dimension should be same (!!!)
oc-content/themes/veronika/images/no-image.png
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Greed95

  • **
  • 8 posts
Re: no-image.png with different picture
« Reply #2 on: March 12, 2018, 10:30:53 AM »
I want to make different in all categories
is it possible?

*

MB Themes

Re: no-image.png with different picture
« Reply #3 on: March 12, 2018, 11:53:38 AM »
You mean different for each cattegory?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Greed95

  • **
  • 8 posts
Re: no-image.png with different picture
« Reply #4 on: March 12, 2018, 12:03:30 PM »
Yes that's right

Marked as best answer by Greed95 on March 12, 2018, 01:25:54 PM
*

MB Themes

Re: no-image.png with different picture
« Reply #5 on: March 12, 2018, 12:54:24 PM »
@Greed95
1) upload images in format:
oc-content/themes/veronika/images/no-image-{cat_id}.png

{cat_id} replace with id of category, example: no-image-1.png (for category with ID 1)

2) update loop-single.php and loop-single-premium.php where find code:
Code: [Select]
<?php echo osc_current_web_theme_url('images/no-image.png'); ?>
And replace it with:
Code: [Select]
<?php echo osc_current_web_theme_url('images/no-image-' osc_item_category_id() . '.png'); ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ivanko

  • *****
  • 391 posts
Re: no-image.png with different picture
« Reply #6 on: March 12, 2018, 01:19:49 PM »
@Greed95
1) upload images in format:
oc-content/themes/veronika/images/no-image-{cat_id}.png

{cat_id} replace with id of category, example: no-image-1.png (for category with ID 1)

2) update loop-single.php and loop-single-premium.php where find code:
Code: [Select]
<?php echo osc_current_web_theme_url('images/no-image.png'); ?>
And replace it with:
Code: [Select]
<?php echo osc_current_web_theme_url('images/no-image-' osc_item_category_id() . '.png'); ?>
nice one:)
I have 2500  categories :)

*

Greed95

  • **
  • 8 posts
Re: no-image.png with different picture
« Reply #7 on: March 12, 2018, 01:28:06 PM »
@Greed95
1) upload images in format:
oc-content/themes/veronika/images/no-image-{cat_id}.png

{cat_id} replace with id of category, example: no-image-1.png (for category with ID 1)

2) update loop-single.php and loop-single-premium.php where find code:
Code: [Select]
<?php echo osc_current_web_theme_url('images/no-image.png'); ?>
And replace it with:
Code: [Select]
<?php echo osc_current_web_theme_url('images/no-image-' osc_item_category_id() . '.png'); ?>

Everything worked out! Incredible! Thank you so much!

*

MB Themes

Re: no-image.png with different picture
« Reply #8 on: March 12, 2018, 04:18:44 PM »
@Ivanko
It's time to work  ::)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Greed95

  • **
  • 8 posts
Re: no-image.png with different picture
« Reply #9 on: March 12, 2018, 05:04:27 PM »
Sorry
It turned out that there is no photo in the "Premium" on the main page.
but in another place is.
see the photo
« Last Edit: March 12, 2018, 10:29:44 PM by Greed95 »

*

Greed95

  • **
  • 8 posts
Re: no-image.png with different picture
« Reply #10 on: March 13, 2018, 04:42:39 PM »
I've done everything
I solved the problem