Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
Post your project for free and start receiving proposals from freelancers within minutes after publication!

Please help with PHP.

Translated1 USD

Client's review of cooperation with Ivan P.

Quality
Professionalism
Cost
Contactability
Deadlines

Ivan quickly dealt with the task. He immediately began to perform the task and performed it perfectly.
I will continue to work with Ivan.
Thank you for work.

Freelancer's review of cooperation with Vladimir Verny

Payment
Task setting
Clarity of requirements
Contactability

The work went great. All of the points clearly discussed, nothing more. timely payment. I recommend !

Client does not wish to make a prepayment? Payment through Safe helps avoid potential fraud.
  1. 427    31  0
    Winning proposal1 day1 USD

    Call me, I will do.

  2. 196  
    1 day20 USD

    Hi, I will quickly and quality fulfill your order, my email: [email protected]

  3. 415    9  0   1
    1 day22 USD

    You have a lot of categories. Make a var_dump massive, see which key in the required category and do unset

  4. 594    15  0
    1 day50 USD

    I do it quickly!
    C of UW. We go. Web development experience - over 7 years.
    by: lovesexguns

  5. 1 proposal concealed
  • Ivan P.
    18 August 2015, 21:24 |

    после
    foreach($this->categories as $k=>$category)
    попробуйте поставить что-то типа
    if ($category->id != укажите id нужной категории ) {
    ...остальной код
    }

  • Vladimir Verny
    18 August 2015, 21:32 |

    if ($category->category_id != 188 ) {
    ...остальной код
    }

    Так я делал, категория скрывается, но ломается структура

    489d742495.jpg

  • Profile blocked
    18 August 2015, 21:45 |

    Через unset попробуйте. Если не выйдет, то в скайп стучите alexxxx12345g5 , просто так помогу.

  • Ivan P.
    18 August 2015, 21:47 |

    По ключу не вариант, если категорию снять с публикации ключи сместятся и все слетит

  • Ivan P.
    18 August 2015, 21:49 |

    На крайняк можно переверстать
    не делать через table, а например блочную верстку сделать

  • Vladimir Verny
    18 August 2015, 21:50 |

    Снимать с публикации не желательно. Эта категория содержит один товар.

    Через unset - как?

  • Profile blocked
    18 August 2015, 21:51 |
    <?php
    $var = ['bar','foo'];
    print_r($var);
    unset($var[1]);
    print_r($var);
  • Vladimir Verny
    18 August 2015, 22:26 |

    Что-то не выходит у меня с

    unset
  • Profile blocked
    18 August 2015, 22:33 |

    Больше кода можно? Как вариант то можно было бы запрос к БД отредачить..

  • Vladimir Verny
    18 August 2015, 22:35 |
    <div class="jshop_list_category">
    <?php
    if (count($this->categories)){?>
    <table class = "jshop">

    <?php foreach($this->categories as $k=>$category){?>
    <?php /* if ($category->category_id != 188 ) { */?>

    <?php if ($k%$this->count_category_to_row==0) print "<tr>"; ?>
    <td class="jshop_categ" width="<?php print (100/$this->count_category_to_row)?>%">
    <a class="img" href="<?php print $category->category_link;?>"><img src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name);?>" title="<?php print htmlspecialchars($category->name);?>" /></a>
    <a class="product_link" href="<?php print $category->category_link?>"><?php print $category->name?></a>
    </td>

    <?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) print '</tr>'; ?>

    <?php } ?>
    <?php/* } */ ?>
    <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</tr>'; ?>
    </table>
    <?php } ?>
    </div>
  • Ivan P.
    18 August 2015, 22:42 |

    условие

    [php]
    <?php /* if ($category->category_id != 188 ) { */?>
    [/php]
    закройте после
    [php]
    <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</tr>'; ?>
    [/php]

    а не перед

  • Vladimir Verny
    18 August 2015, 22:46 |

    Сделал так, теперь

    в каждой строке по одной категории)

    8a1d901423.jpg

  • Ivan P.
    18 August 2015, 22:47 |

    в общем без фтп и ссылки на сайт тут не разберешься...

  • Profile blocked
    18 August 2015, 22:52 |

    костыли от Бога...

  • Profile blocked
    18 August 2015, 22:44 |

    Хм. Жаль, я не работал с жумлой...

  • Dmitry Gor
    19 August 2015, 8:24 |

    Здраствуйте!

    Возможно попробуйте так?

    <div class="jshop_list_category">
    <?php
    if (count($this->categories)){?>
    <table class = "jshop">

    <?php foreach($this->categories as $k=>$category){?>
    <?php if ($category->category_id == 188 ) { continue; }/?>

    <?php if ($k%$this->count_category_to_row==0) print "<tr>"; ?>
    <td class="jshop_categ" width="<?php print (100/$this->count_category_to_row)?>%">
    <a class="img" href="<?php print $category->category_link;?>"><img src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name);?>" title="<?php print htmlspecialchars($category->name);?>" /></a>
    <a class="product_link" href="<?php print $category->category_link?>"><?php print $category->name?></a>
    </td>

    <?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) print '</tr>'; ?>

    <?php } ?>
    <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</tr>'; ?>
    </table>
    <?php } ?>
    </div>

  • Dmitry Gor
    19 August 2015, 9:19 |

    а вывод в 3 колонки можно попробовать сделать так заменить

    <?php if ($k%$this->count_category_to_row==0) print "<tr>"; ?>

    на

    <?php if ($k % 3 == 0) print "<tr>"; ?>


  • Dmitry Gor
    19 August 2015, 8:27 |

    Правда закладываться на идентификатор категории не рекомендую, так как это явный костыль )), как вариант в категории добавить класс, либо какое то описание и по нему уже ориентироваться.

  • Profile deleted
    19 August 2015, 9:10 |

    может так -

    <div class="jshop_list_category">

    <?php

    if (count($this->categories)){?>

    <table class = "jshop">

    <?php foreach($this->categories as $k=>$category){?>

    <?php if ($category->category_id != 188 ) continue; ?>

    <?php if ($k%$this->count_category_to_row==0) print "<tr>"; ?>

    <td class="jshop_categ" width="<?php print (100/$this->count_category_to_row)?>%">

    <a class="img" href="<?php print $category->category_link;?>"><img src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name);?>" title="<?php print htmlspecialchars($category->name);?>" /></a>

    <a class="product_link" href="<?php print $category->category_link?>"><?php print $category->name?></a>

    </td>

    <?php if ($k%$this->count_category_to_row==$this->count_category_to_row-1) print '</tr>'; ?>

    <?php } ?>

    <?php if ($k%$this->count_category_to_row!=$this->count_category_to_row-1) print '</tr>'; ?>

    </table>

    <?php } ?>

    </div>

  • Vladimir Verny
    19 August 2015, 9:22 |

    Дмитрий и Генадий, варианты не подошли.

    Все так же товар только скрывается.


    Как написать условия, что мол выводим все категории кроме "id188" ? Надо , наверное, где-то в helpere писать..

  • Ivan P.
    19 August 2015, 9:25 |

    нет. не в контроллере, можно и в шаблоне.
    Почему вы не хотите доверить дело специалисту и оплатить за его знания и труд ?
    Тут фриланс, а не форум для обсуждения проблем на сайте.

  • Dmitry Gor
    19 August 2015, 9:25 |

    У Вас вывод колонок формируется

    в этой строке

    <?php if ($k%$this->count_category_to_row==0) print "<tr>"; ?>

    а вот таким образом вы можете управлять количеством колонок

    <?php if ($k % 3 == 0) print "<tr>"; ?>

    ну и ниже также нужно исправить, или найти где происходит инициализация переменной $this->count_category_to_row и исправить ее


Current freelance projects in the category PHP

Development of a WordPress website

23 USD

We are looking for a contractor to develop a custom website on WordPress for a jewelry store. The first stage will be a consultation.

Content Management SystemsPHP ∙ 1 day 12 hours back ∙ 60 proposals

The WooCommerce cart (WordPress) is broken — it does not add products and the cart page does not open.

On the website of the online store https://www.dobryi-gospodar.com/ (WordPress + WooCommerce), the checkout function has completely stopped working. When clicking the "Add to cart" button (both in the product card and in the catalog), a long loading process begins (the indicator…

Content Management SystemsPHP ∙ 1 day 13 hours back ∙ 57 proposals

Product search function by image

It is necessary to develop and integrate a product search function by image on the website.What needs to be implementedA "Search by Photo" button on the website.Image upload by the user: JPG.Search for visually similar products in the catalog.Display results in the form of…

PHPWeb Programming ∙ 1 day 21 hours back ∙ 44 proposals

Parser expireddomains.net

113 USD

A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write.

PHPWeb Programming ∙ 3 days 20 hours back ∙ 51 proposals

Integration of payment service with Sales Force

70 USD

There is a payment system widget on the site that needs to be integrated with Salesforce so that all required parameters are visible on the Salesforce side. It needs to be done in such a way that all payments and subscriptions are controlled through Salesforce.

PHPWeb Programming ∙ 3 days 23 hours back ∙ 41 proposals

Client
Vladimir Verny
Ukraine Ukraine  112  0
Project published
10 years back
554 views