Find Jobs
Hire Freelancers

edit prestashop hook

$10-30 CAD

Anuluar
Postuar 6 months ago

$10-30 CAD

Paguhet në dorëzim
this prestashop hook give me only the first result even if the customer buy 2 items, public function hookDisplayAdminOrder($params) { $id_order = (int) Tools::getValue('id_order'); // Get all products associated with the order $sql = 'SELECT product_id FROM '._DB_PREFIX_.'order_detail WHERE id_order = '.(int) $id_order; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); $product_ids = array(); foreach ($result as $row) { $product_ids[] = $row['product_id']; } // Iterate over all products foreach ($product_ids as $product_id) { // Obter informações do produto $sql_product = 'SELECT url FROM '._DB_PREFIX_.'scrape_ali_info WHERE id_product='.(int) $product_id; $product_data = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql_product); // Do something with product information $this->context->smarty->assign(array( 'id_produto' => $product_id, 'ali_url' => $product_data['url'], 'id_order' => $id_order )); // Here you can make decisions about what to do with the data, or just display it echo $this->display(__FILE__, 'views/templates/admin/[login to view URL]'); } } when I try to do echo inside, its not working. someone can only edit this code to make it work.
ID e Projektit: 37418774

Rreth projektit

Projekt në distancë
Aktive 6 mos ago

Po kërkoni të fitoni para?

Përfitimet e ofertës për Freelancer

Vendosni buxhetin dhe afatin tuaj
Paguhuni për punën tuaj
Përshkruani propozimin tuaj
Është falas të regjistrohesh dhe të bësh oferta për punë

Rreth klientit

Flamuri i CANADA
Longueuil, Canada
4,0
16
Mënyra e pagesës u verifikua
Anëtar që nga dhj 22, 2007

Verifikimi i klientit

Faleminderit! Ne ju kemi dërguar me email një lidhje për të kërkuar kredinë tuaj falas.
Ndodhi një gabim gjatë dërgimit të email-it tuaj. Ju lutemi provoni përsëri.
Përdorues të regjistruar Punë të postuara
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Po ngarkohet shikimi paraprak
Leja u dha për Geolocation.
Seanca e hyrjes ka skaduar dhe ke dalë. Hyr sërish.