Find Jobs
Hire Freelancers

Add to a Simple XML Object

$2-10 USD / hour

Ukończony
Opublikowano ponad 11 lat temu

$2-10 USD / hour

I need someone to quickly solve this problem and tell me whats being done wrong. First solution gets paid. I need to add additional products to the $products object using the $fields array to set the key/values. This job will pay $15. It should be very quick for someone who knows just a little more than me. When using the code below to add a product to the $products SimpleXML object I get an error Warning: Illegal offset type in file and can't figure out what is wrong. $fields = array( $o->order_id => 'order_id', $o->order_address_id => 'order_address_id', $o->price_ex_tax => 'price_ex_tax' , 'DISCS' => 'sku', '1' => 'quantity' ); $products->addChild('product'); array_walk_recursive($fields, array ($products, 'addChild')); HERE IS MY SIMPLEXML OBJECT using print_r for $products: SimpleXMLElement Object ( [product] => Array ( [0] => SimpleXMLElement Object ( [id] => 23 [order_id] => 110 [product_id] => 63477 [order_address_id] => 11 [name] => Dead Sea Treasures Foot Cream [sku] => 703 [type] => physical [base_price] => 20.0000 [price_ex_tax] => 20.0000 [price_inc_tax] => 20.0000 [price_tax] => 0.0000 [base_total] => 40.0000 [total_ex_tax] => 40.0000 [total_inc_tax] => 40.0000 [total_tax] => 0.0000 [weight] => 0.5 [quantity] => 2 [base_cost_price] => 0.0000 [cost_price_inc_tax] => 0.0000 [cost_price_ex_tax] => 0.0000 [cost_price_tax] => 0.0000 [is_refunded] => false [refund_amount] => 0.0000 [return_id] => 0 [wrapping_name] => SimpleXMLElement Object ( )
Identyfikator projektu: 4069103

Informację o projekcie

5 ofert
Zdalny projekt
Aktywny 11 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
Przyznano:
Awatar Użytkownika
I can fix this problem of SimpleXML Object. I can complete this work in next few hours.
$15 USD w 1 dzień
5,0 (673 opinii)
7,5
7,5
5 freelancerzy składają oferty o średniej wysokości $12 USD/godz. dla tej pracy
Awatar Użytkownika
ready to fix sir
$10 USD w 1 dzień
4,9 (327 opinii)
6,3
6,3
Awatar Użytkownika
Try dumping the var values for $o->price_ex_tax
$15 USD w 1 dzień
5,0 (20 opinii)
5,2
5,2
Awatar Użytkownika
Hello, I have 4+ years of experience in website customization and i believe that I can do this. Looking forward to work with you. Thanks
$10 USD w 6 dni
4,8 (14 opinii)
4,0
4,0

O kliencie

Flaga UNITED STATES
Belleville, United States
4,9
59
Zweryfikowana metoda płatności
Członek od lip 13, 2004

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.