עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

הRSS Feed לא מוצג כמו שצריך

Featured Replies

פורסם

תנסה Encode in UTF-8 without BOM. יש לי הרגשה שהתו BOM בהתחלה יכול ליצור את הבעיה.

פורסם
  • מחבר

תנסה Encode in UTF-8 without BOM. יש לי הרגשה שהתו BOM בהתחלה יכול ליצור את הבעיה.

ניסיתי, לא עובד :\

פורסם

על קובץ קיים אתה צריך לעשות Convert to UTF-8 without BOM, לא סתם Encode.

פורסם
  • מחבר

על קובץ קיים אתה צריך לעשות Convert to UTF-8 without BOM, לא סתם Encode.

זה מה שעשיתי :\ זה לא עוזר

עריכה:

הcontent-type נשאר text/html למרות שאני מגדיר לו text/html, מה יכול לגרום לזה? :\

עוד עריכה:

ברוך ה' אחרי שבוע שדפקתי ת'ראש בקיר מצאתי את הבעיה :)

הHEADERS לא נשלחים כמו שצריך כשהקובץ נמצא עם קידוד UTF-8 אלא רק עם ANSI, והבעיה היא שהטקסט שנשלף מהמסד נתונים היה בעברית ככה שהייתי חייב (או לפחות חשבתי ככה) להגדיר את הקובץ כUTF-8, מה שעשיתי זה שהגדרתי את הקידוד כANSI והוספתי לכל טקסט שנשלף בעברית תג htmlspecialchars שהגדיר אותו ספציפית כUTF-8, ככה הקוד נראה אחרי התיקון:


<?php
class Controllerzapprod extends Controller {

public function plainText($description){

$description = strip_tags(html_entity_decode($description));
$description = str_replace(' ', ' ', $description);
$description = str_replace('"', '&#34;', $description );
$description = str_replace("'", '&#39;', $description );
$description = str_replace('<', '<', $description );
$description = str_replace('>', '>', $description );
$description = str_replace("\n", ' ', $description );
$description = str_replace("\r", ' ', $description );
$description = preg_replace('/&#?[a-z0-9]+;/i',' ',$description); // remove any html entities..
$description = preg_replace('/\s{2,}/i', ' ', $description );
return substr($description, 0, 500000 );
}

public function index() {
if(isset($this->request->get['cat'])){
$output = '<?xml version="1.0" encoding="UTF-8" ?>';
$output .= '<STORE URL="' . HTTP_SERVER . '" DATE="'. date('d.m.Y') .'" TIME="'. date('H:i:s') .'" NAME="'. $this->config->get('config_name') .'" STATUS="ONLINE" ID="0">';

$this->load->model('catalog/product');
$this->load->model('tool/image');

$data = array(
'filter_category_id' => $this->request->get['cat'],
'sort' => '',
'order' => '',
'start' => '',
'limit' => ''
);

$products = $this->model_catalog_product->getProducts($data);

$output .= '<PRODUCTS>';
foreach ($products as $product) {

$output .= '<PRODUCT>';
$output .= '<PRODUCT_NAME>' . htmlspecialchars($product['name'], ENT_COMPAT, 'UTF-8') . '</PRODUCT_NAME>';
$output .= '<PRODUCT_URL>' . HTTP_SERVER . 'index.php?route=product/product&product_id=' . $product['product_id'] . '</PRODUCT_URL>';
$output .= '<DETAILS>' . htmlspecialchars($this->plainText($product['description']), ENT_COMPAT, 'UTF-8') . '</DETAILS>';
$output .= '<MANUFACTURER>' . $this->plainText($product['manufacturer']) . '</MANUFACTURER>';
$output .= '<CATALOG_NUMBER>' . $product['product_id'] . '</CATALOG_NUMBER>';
if ($product['image']) {
$output .= '<IMAGE>' . $this->model_tool_image->resize($product['image'], 500, 500) . '</IMAGE>';
} else {
$output .= '<IMAGE>' . $this->model_tool_image->resize('no_image.jpg', 500, 500) . '</IMAGE>';
}
$output .= '<MODEL>' . $product['model'] . '</MODEL>';
$output .= '<CURRENCY>ILS</CURRENCY>';
if ((float)$product['special']) {
$output .= '<PRICE>' . substr($product['price'], 0, strpos($product['special'], '.')) . '</PRICE>';
} else {
$output .= '<PRICE>' . substr($product['price'], 0, strpos($product['price'], '.')) . '</PRICE>';
}
$output .= '<SHIPMENT_COST>0</SHIPMENT_COST>';
$output .= '<DELIVERY_TIME>7</DELIVERY_TIME>';
$output .= '<WARRANTY />';
$output .= '<TAX />';
$output .= '</PRODUCT>';
}
$output .= '</PRODUCTS>';
$output .= '</STORE>';
$this->response->addHeader('Content-Type: text/xml; charset=utf-8');
$this->response->setOutput($output);
}
else { echo '<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.hd1.co.il/index.php?route=zapindex">'; }
}

}
?>

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.