Jump to content

Search the Community

Showing results for tags 'improper image'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I'm having the following problem with a third party script image name is getting renamed to /catalog/view/theme/default/image/stars-5.0000.png instead of /catalog/view/theme/default/image/stars-5.png here is the script any help would be appreciated Thanks <modification> <id><![CDATA[AutoRelated Products]]></id> <version><![CDATA[4.0]]></version> <vqmver><![CDATA[2.4.5]]></vqmver> <author><![CDATA[sopedro]]></author> <file name="catalog/controller/product/product.php"> <operation> <search position="after"><![CDATA[$results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);]]></search> <add><![CDATA[ //related by category if(count($results)<4){//change to suit number of products to display $temp = $this->model_catalog_product->getProductRelatedByCategory($this->request->get['product_id'],count($results)); foreach($temp as $t){ if(!empty($t)){ $results[] = $t; } } } //related by manufacturer $this->data['product_info'] = $product_info; if(count($results)<4 && (int)$this->data['product_info']['manufacturer_id'] > 0){//change to suit number of products to display $temp = $this->model_catalog_product->getProductRelatedByManufacturer($this->data['product_info']['manufacturer_id'],$this->request->get['product_id'],count($results)); foreach($temp as $t){ if(!empty($t)){ $results[] = $t; } } } //related by randomisation if(count($results)<4){//change to suit number of products to display $temp = $this->model_catalog_product->getProductRelatedByNothing($this->request->get['product_id'],count($results)); foreach($temp as $t){ if(!empty($t)){ $results[] = $t; } } } ]]></add> </operation> </file> <file name="catalog/model/catalog/product.php"> <operation> <search position="after" offset="4"><![CDATA[$product_data[$result['related_id']] = $this->getProduct($result['related_id']);]]></search> <add><![CDATA[ public function getProductRelatedByCategory($product_id,$num_results) { //return array(); $product_data = array(); $num = 4 - $num_results;//change to suit number of products to display $getCat = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_category WHERE product_id = '" . (int)$product_id . "'"); $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_category WHERE category_id = '" . (int)$getCat->row['category_id'] . "' AND product_id != '" . (int)$product_id . "' ORDER BY RAND() LIMIT 0,".$num.""); foreach ($query->rows as $result) { $product_data[$result['product_id']] = $this->getProduct($result['product_id']); } return $product_data; } public function getProductRelatedByManufacturer($manufacturer_id,$product_id,$num_results) { //return array(); $product_data = array(); $num = 4 - $num_results;//change to suit number of products to display $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product WHERE manufacturer_id = '" . (int)$manufacturer_id . "' AND product_id != '" . (int)$product_id . "' LIMIT 0,".$num.""); foreach ($query->rows as $result) { $product_data[$result['product_id']] = $this->getProduct($result['product_id']); } return $product_data; } public function getProductRelatedByNothing($product_id,$num_results) { $product_data = array(); $num = 4 - $num_results;//change to suit number of products to display $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product WHERE product_id != '" . (int)$product_id . "' ORDER BY RAND() LIMIT 0,".$num.""); foreach ($query->rows as $result) { $product_data[$result['product_id']] = $this->getProduct($result['product_id']); } return $product_data; } ]]></add> </operation> </file> </modification>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.