Projekt

Allgemein

Profil

GX-Bug #48653 » OrderAttributesModelFix.patch

Till Tepelmann, 22.09.2016 15:00

Unterschiede anzeigen:

src/includes/classes/shopping_cart.php (revision )
515 515
		return $t_output_weight;
516 516
	}
517 517

  
518
	function get_attributes_model($products_id)
519
	{
520

  
521
		$language=$_SESSION['languages_id'];
522

  
523
		foreach($this->contents[$products_id]['attributes'] as $options_id => $options_values_id)
524
		{
525
			$options_value_id_query=xtc_db_query("SELECT
526
												pa.attributes_model
527
												FROM
528
												".TABLE_PRODUCTS_ATTRIBUTES." pa
529
												WHERE
530
												pa.products_id = '".(int)$products_id."'
531
												AND pa.options_id = '".(int)$options_id."'
532
												AND pa.options_values_id = '".$options_values_id."'
533
												");
534

  
535

  
536
			$options_attr_data = xtc_db_fetch_array($options_value_id_query);
537
			$attributes_model .= $options_attr_data['attributes_model'];
538
		}
539

  
540
		return $attributes_model;
541

  
542
	}
543

  
518 544
	function get_products()
519 545
	{
520 546
		global $xtPrice, $main;
......
569 595
						$t_properties_weight = $products['products_weight'];
570 596
					}
571 597

  
598
					$model = $products['products_model'];
599
					if(empty($model)) $model = $this->get_attributes_model($products_id);
600

  
572 601
					$products_array[] = array(
573 602
						'id' => $products_id,
574 603
						'name' => $products['products_name'],
575 604
						'checkout_information' => $products['checkout_information'],
576
						'model' => $products['products_model'],
605
						'model' => $model,
577 606
						'image' => $products['products_image'],
578 607
						'price' => $products_price,
579 608
						'quantity' => $this->contents[$products_id]['qty'],
    (1-1/1)