Correction of the PHP code
Client's review of cooperation with Stanislav Fedorenko
Correction of the PHP codeI recommend a great freelancer! Instantly insisted in the essence of the work, quickly and professionally determined the lines with errors and corrected! I will cooperate in the future.
Freelancer's review of cooperation with Roman Bondar
Correction of the PHP codeA good customer. He clearly set a task. I paid the job immediately after performing. It was pleasant to work.The !
-
Winning proposal1 day
12412 264 0 1 Winning proposal1 dayReady to do
-
50р?
-
100 грн, нужно смотреть сайт...
-
Там просмотреть строк 20-30 которые отвечают за выборку и вывод, я даже скажу какие, где-то банальная ошибка
-
Ну пишите сюда эти самые строки...
-
+1 Строки в студию.
-
хорошо. вот сама выборка - отрабатывает четко
function showSpecOffers ($subcategory, $order, $all='') {
global $wpdb;
if ($order=="name") $o="order by name";
else $o='';
$category = $subcategory;
if(!$all){
$all=$wpdb->get_var ($wpdb->prepare('select isAll from le_categories where Id=%d', $subcategory));
$category=$wpdb->get_var ($wpdb->prepare('select category from le_categories where Id=%d', $subcategory));
}
$subcategories=$this->getSubcategories($subcategory);
$subCatIds=array();
foreach($subcategories as $subcat){
array_push($subCatIds, $subcat->id);
}
$in = '';
if($subCatIds){
$subCatIds= join(',',$subCatIds);
$in = 'or subcategories IN ('. $subCatIds .')';
}
if ($all==0)
$result=$wpdb->get_results ("select o.name, o.link, comment1, comment2,comment3, comment4, comment5,
o.image, buttonname, b.name as bankname, offerlink
from le_offers o
join le_banks b on b.id=o.bank
where concat(',',o.subcategories,',') like '%,$subcategory,%' $o");
else {
$result=$wpdb->get_results ("select o.name, o.link, comment1, comment2,comment3, comment4, comment5,
o.image, buttonname, b.name as bankname, offerlink
from le_offers o
join le_banks b on b.id=o.bank
where category=$category $in or subcategories = $category $o ");}
return $result;
}
вот в дальнейшем как передается
function leoffers_specoffers($page, $all, $order) {
if(!$page)
$page=(get_page_by_path($_SERVER['REQUEST_URI'])->ID);
$subcategoryId=$this->getCategoryByPage($page);
if($subcategoryId)
$specOffers=$this->showSpecOffers($subcategoryId, $order, 1);
ob_start();
include(ABSPATH . 'wp-content/plugins/leoffers/leoffers_mq_specoffers.php');
$content = ob_get_contents();
ob_end_clean();
return $content;
}
тут (если вместо 1 выделенной ) товар появляется в подкатегориях, но соответсвенно пропадает в основной категории
-
ну а на саму страницу выводится через цикл перебора массивов foreach
<ul>
<?php
foreach ($specOffers1 as $specOffer) {?>
<li>
код....................................
</li>
<?}?>
</ul><!--special-->
-
Current freelance projects in the category PHP
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. PHP, Web Programming ∙ 1 day 13 hours back ∙ 48 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. PHP, Web Programming ∙ 1 day 17 hours back ∙ 40 proposals |
Intercom systems
90 USD
We are looking for an experienced BAS (1C 8.3) programmer to refine a custom configuration for the business processes of our company. What is needed: — Study the current custom BAS 8.3 configuration — Refine and adjust it to our processes — Accounting: clients, contracts,… PHP, Databases & SQL ∙ 4 days 16 hours back ∙ 13 proposals |
Exporting goods from 1C to prom.uaCreate and configure an API export module for products from 1C to the cabinet and to the site prom.ua, rozetka, or another marketplace of your choice, including stock, names, images from 1C, prices, automatic export, automatic updates. PHP, Databases & SQL ∙ 5 days 8 hours back ∙ 21 proposals |
Fix the WPML translation issueThe website has product translation set up through the Advanced Editor. The translations in the editor are correct, but the incorrect text is displayed on the site. If you go to the page editor (in the language we are translating to), that is exactly the text indicated (in… PHP, Web Programming ∙ 6 days 9 hours back ∙ 37 proposals |