function google_cars() { echo '<rss version ="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <title>' . osc_page_title() . '</title> <description>' . osc_page_description() . '</description> <link>' . osc_base_url() . '</link>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_car_data(osc_item()); $date = date('d/m/Y'); $time = date('H:i'); if (preg_match('|([0-9]{4})-([0-9]{2})-([0-9]{2})|', osc_item_pub_date(), $tmp)) { $date = $tmp[3] . "/" . $tmp[2] . "/" . $tmp[1]; } echo '<item> <title>' . osc_item_title() . '</title> <description>' . osc_item_description() . '</description> <g:id>' . osc_item_id() . '</g:id> <link>' . osc_item_url() . '</link> <g:location>' . (osc_item_address() != '' ? osc_item_address() : '') . ', ' . (osc_item_city() != '' ? osc_item_city() : '') . ', ' . (osc_item_region() != '' ? osc_item_region() : '') . ', ' . (osc_item_zip() != '' ? osc_item_zip() : '') . ' ' . (osc_item_country() != '' ? osc_item_country() : '') . '</g:location> <g:publish_date>' . $date . '</g:publish_date> <g:color>' . (isset($item['s_color']) ? $item['s_color'] : '') . '</g:color> <g:condition>' . (isset($item['b_new']) && $item['b_new'] == 1 ? 'new' : 'used') . '</g:condition>'; if (osc_count_item_resources() > 0) { while (osc_has_item_resources()) { if (strpos(osc_resource_type(), 'image') !== FALSE) { echo '<g:image_link>' . osc_resource_path() . '</g:image_link>'; } } } echo '<g:make>' . (isset($item['s_make']) ? $item['s_make'] : '') . '</g:make> <g:mileage>' . (isset($item['i_mileage']) ? $item['i_mileage'] : '') . '</g:mileage> <g:model>' . (isset($item['s_model']) ? $item['s_model'] : '') . '</g:model> <g:price>' . (osc_item_price() != '' ? osc_item_price() : '') . '</g:price> <g:vehicle_type>' . (isset($item['s_name']) ? $item['s_name'] : '') . '</g:vehicle_type> <g:year>' . (isset($item['i_year']) ? $item['i_year'] : '') . '</g:year> </item>'; } } echo '</channel> </rss>'; }
function oodle_realstate() { echo '<?xml version="1.0" encoding="utf-8"?><listings>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_house_data(osc_item()); $time = explode(" ", osc_item_pub_date()); if (isset($item['s_square_meters'])) { $lot_size = $item['s_square_meters'] * 10.7639104; } else { $lot_size = 0; } $amenities = array(); if (isset($item['b_heating']) && $item['b_heating']) { $amenities[] = __('Heating', 'extra_feeds'); } if (isset($item['b_air_condition']) && $item['b_air_condition']) { $amenities[] = __('Air condition', 'extra_feeds'); } if (isset($item['b_elevator']) && $item['b_elevator']) { $amenities[] = __('Elevator', 'extra_feeds'); } if (isset($item['b_terrace']) && $item['b_terrace']) { $amenities[] = __('Terrace', 'extra_feeds'); } if (isset($item['b_parking']) && $item['b_parking']) { $amenities[] = __('Parking', 'extra_feeds'); } echo '<listing> <category>' . osc_item_category() . '</category> <description><![CDATA[' . osc_item_description() . ']]></description> <id>' . osc_item_id() . '</id> <title><![CDATA[' . osc_item_title() . ']]></title> <url>' . osc_item_url() . '</url> <address>' . osc_item_address() . '</address> <city>' . osc_item_city() . '</city> <country>' . osc_item_country_code() . '</country> <neighborhood>' . osc_item_city_area() . '</neighborhood> <state>' . osc_item_region() . '</state> <zip_code>' . osc_item_zip() . '</zip_code> <longitude>' . osc_item_longitude() . '</longitude> <latitude>' . osc_item_latitude() . '</latitude> <amenities>' . implode(", ", $amenities) . '</amenities> <bathrooms>' . @$item['i_num_bathrooms'] . '</bathrooms> <bedrooms>' . @$item['i_num_rooms'] . '</bedrooms> <condition>' . @$item['e_status'] . '</condition> <create_time>' . $time[0] . '</create_time> <currency>' . osc_item_currency() . '</currency> <furnished>' . (@$item['b_furnished'] ? 'Furnished' : '') . '</furnished>'; if (osc_count_item_resources() > 0) { if (strpos(osc_resource_type(), 'image') !== FALSE) { echo '<image_url><![CDATA[' . osc_resource_path() . ']]></image_url>'; } } echo '<lot_size>' . $lot_size . '</lot_size> <lot_size_units>square feet</lot_size_units> <price>' . osc_item_price() . '</price> <seller_email>' . osc_item_contact_email() . '</seller_email> <seller_name><![CDATA[' . osc_item_contact_name() . ']]></seller_name> <year>' . @$item['i_year'] . '</year> </listing>'; } } echo '</listings>'; }
function trovit_cars() { echo '<?xml version="1.0" encoding="utf-8"?> <trovit>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_car_data(osc_item()); $date = date('d/m/Y'); $time = date('H:i'); if (preg_match('|([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})|', osc_item_pub_date(), $tmp)) { $date = $tmp[3] . "/" . $tmp[2] . "/" . $tmp[1]; $time = $tmp[4] . ":" . $tmp[5]; } echo '<ad> <id><![CDATA[' . osc_item_id() . ']]></id> <url><![CDATA[' . osc_item_url() . ']]></url> <title><![CDATA[' . osc_item_title() . ']]></title> <content><![CDATA[' . osc_item_description() . ']]></content> <price><![CDATA[' . osc_item_price() . ']]></price> <make><![CDATA[' . (isset($item['s_make']) ? $item['s_make'] : '') . ']]></make> <model><![CDATA[' . (isset($item['s_model']) ? $item['s_model'] : '') . ']]></model> <color><![CDATA[' . (isset($item['s_color']) ? $item['s_color'] : '') . ']]></color> <mileage><![CDATA[' . (isset($item['i_mileage']) ? $item['i_mileage'] : '') . ']]></mileage> <doors><![CDATA[' . (isset($item['i_doors']) ? $item['i_doors'] : '') . ']]></doors> <fuel><![CDATA[' . (isset($item['e_fuel']) ? $item['e_fuel'] : '') . ']]></fuel> <transmission><![CDATA[' . (isset($item['e_transmission']) ? $item['e_transmission'] : '') . ']]></transmission> <engine_size><![CDATA[' . (isset($item['i_engine_size']) ? $item['i_engine_size'] : '') . ']]></engine_size> <cylinders><![CDATA[' . (isset($item['i_cylinders']) ? $item['i_cylinders'] : '') . ']]></cylinders> <power unit="' . (isset($item['e_power_unit']) ? $item['e_power_unit'] : '') . '"><![CDATA[' . (isset($item['i_power']) ? $item['i_power'] : '') . ']]></power> <seats><![CDATA[' . (isset($item['i_seats']) ? $item['i_seats'] : '') . ']]></seats> <gears><![CDATA[' . (isset($item['i_gears']) ? $item['i_gears'] : '') . ']]></gears> <address><![CDATA[' . (osc_item_address() != '' ? osc_item_address() : '') . ']]></address> <city><![CDATA[' . (osc_item_city() != '' ? osc_item_city() : '') . ']]></city> <city_area><![CDATA[' . (osc_item_city_area() != '' ? osc_item_city_area() : '') . ']]></city_area> <postcode><![CDATA[' . (osc_item_zip() != '' ? osc_item_zip() : '') . ']]></postcode> <region><![CDATA[' . (osc_item_region() != '' ? osc_item_region() : '') . ']]></region> <latitude><![CDATA[' . (osc_item_latitude() != '' ? osc_item_latitude() : '') . ']]></latitude> <longitude><![CDATA[' . (osc_item_longitude() != '' ? osc_item_longitude() : '') . ']]></longitude>'; $res_string = ''; if (osc_count_item_resources() > 0) { while (osc_has_item_resources()) { if (strpos(osc_resource_type(), 'image') !== FALSE) { $res_string .= '<picture> <picture_url><![CDATA[' . osc_resource_path() . ']]></picture_url> <picture_title><![CDATA[' . osc_resource_name() . ']]></picture_title> </picture>'; } } } if ($res_string != '') { echo '<pictures>' . $res_string . '</pictures>'; } echo ' <date><![CDATA[' . $date . ']]></date> <time><![CDATA[' . $time . ']]></time> </ad>'; } } echo '</trovit>'; }
function multicurrency_add_prices($formatted_price) { if (osc_item_price() != NULL && osc_item_price() != '' && osc_item_price() != 0) { $rates = ModelMC::newInstance()->getRates(osc_item_currency()); $data = array(); foreach ($rates as $r) { $price = osc_item_price() / 1000000 * $r['f_rate']; $symbol = $r['s_to']; $currencyFormat = osc_locale_currency_format(); $currencyFormat = str_replace('{NUMBER}', number_format($price, osc_locale_num_dec(), osc_locale_dec_point(), osc_locale_thousands_sep()), $currencyFormat); $currencyFormat = str_replace('{CURRENCY}', $symbol, $currencyFormat); $data[] = $currencyFormat; } return $formatted_price . ' <a class=MCtooltip href="#">' . __('Other currencies', 'multicurrency') . '<span>' . implode("<br />", $data) . '</span></a>'; } return $formatted_price; }
} else { echo osc_item_contact_name(); } ?> </p> <p class="description"><?php echo osc_highlight(strip_tags(osc_item_description()), 110); ?> </p> <div class="row"> <div class="col-md-5 col-sm-5 col-xs-5 price"> <?php if (osc_price_enabled_at_items()) { ?> <span><?php echo osc_format_price(osc_item_price()); ?> </span><?php } ?> </div> <div class="col-md-7 col-sm-7 col-xs-7 location"> <i class="glyphicon glyphicon-map-marker"></i><?php if (osc_item_region()) { ?> <?php echo osc_item_region(); } else { ?> <?php echo osc_item_country();
" alt="<?php echo osc_item_title(); ?> " /> <?php } else { ?> <img src="<?php echo osc_current_web_theme_url('images/no_photo.gif'); ?> " alt="No image available" /> <?php } ?> <h3><?php $price = osc_item_price() / 1000000; if ($price == 0) { echo '<a href="' . osc_item_url() . '">Contact Seller</a>'; } else { echo $price; } ?> </h3> <p><a href="<?php echo osc_item_url(); ?> "><?php echo osc_item_title(); ?> </a></p> <?php
<div class="item-date"> <i class="fa fa-calendar"></i> <?php if (osc_item_pub_date() !== '') { printf(__('%1$s', 'pop'), osc_format_date(osc_item_pub_date())); } ?> </div> <?php voting_item_detail(); ?> </div> <?php if (osc_price_enabled_at_items() && osc_item_price()) { ?> <div class="item-price"> <?php echo osc_item_formated_price(); ?> </div> <?php } ?> <div> <?php watchlist(); ?> </div>
/** * Gets formated price of current item * * @return string */ function osc_item_formated_price() { return (string) osc_format_price(osc_item_price()); }
?> "><?php echo osc_item_title(); ?> </a></div> <div class="hr" style="width:40%"></div> <div class="add-date"><?php //echo osc_item_pub_date(); ?> </div> <h6 style="color:#737884;"><?php echo osc_item_category(); ?> </h6> <h6><?php echo osc_item_price() / 1000000 . " " . osc_item_currency(); ?> </h6> </li> </ul> <p class="add-para add-para1"><?php echo osc_item_description(); ?> </p> </div> </div> <?php } //END ELSE ?> <?php
?> <div class="row"> <form name="shopping-cart" action="<?php echo osc_current_web_theme_url('includes/updateCart.php'); ?> " method="get"> <input type="hidden" name="itemId" id="itemId" value='<?php echo osc_item_id(); ?> '> <input type="hidden" name="return_url" id="return_url" value="<?php echo osc_item_url(); ?> "> <input type="hidden" name="price" id="price" value="<?php echo osc_item_price(); ?> "> <?php if (StockInHand::newInstance()->checkStockable(osc_item_id())) { ?> <h5>Stock in hand:<?php echo StockInHand::newInstance()->getStock(osc_item_id()); ?> <h5> <input type="hidden" name="stock" id="stock" value="<?php echo StockInHand::newInstance()->getStock(osc_item_id()); ?> "> <div class="form-group"> <input type="number" name="demand" id="demand" max="<?php