Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>function displayProductList(){ // Store View $store = $this-&gt;getStoreViewCode(); $selectedProducts = $this-&gt;getSelectedProducts(); $products = $this-&gt;_products-&gt;getProductsFromDb($selectedProducts, $store, $this-&gt;getProductsStoragePid()); // Load Template File $templateHtml = $this-&gt;cObj-&gt;fileResource( $this-&gt;_getConfig('templateProductList') ); $productListHtml = $this-&gt;cObj-&gt;getSubpart($templateHtml, '###PRODUCT_LIST###'); $productHtml = $this-&gt;cObj-&gt;getSubpart($productListHtml, '###PRODUCT_ITEM###'); $subPartContent = ''; $item = 0; $items = count($products); $even = true; $line = ''; $maxDisplayItem = $this-&gt;_getFlexformConfig('max_item_to_display', 'product_setting'); $products = array_slice($products, 0, $maxDisplayItem); shuffle($products); foreach ($products as $_product) { $markers = $this-&gt;_products-&gt;getProductMarkers($_product); // Even/Odd CSS Class Determination if ($even === true) { $line = 'even'; $even = false; } else { $line = 'odd'; $even = true; } // Class Determination First/Last if ($item == 0) { $markers['###EVENODD###'] = $line . ' ' . 'first'; } else if ($item == $items-1) { $markers['###EVENODD###'] = $line . ' ' . 'last'; } else { $markers['###EVENODD###'] = $line; } // Check if the product has an image $imageHtml = '&lt;p&gt;'.$this-&gt;pi_getLL('template_label_no_image_available').'&lt;/p&gt;'; if ($markers['###DETAIL_IMAGE###'] != 'no_selection') { $imageHtml = $this-&gt;cObj-&gt;getSubpart($productHtml, '###PRODUCT_IMAGE###'); } $p = $this-&gt;cObj-&gt;substituteSubpart($productHtml, '###PRODUCT_IMAGE###', $imageHtml); $subPartContent .= $this-&gt;cObj-&gt;substituteMarkerArray($p, $markers); $item++; } return $this-&gt;cObj-&gt;substituteSubpart($productListHtml, '###PRODUCT_ITEM###', $subPartContent); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload