How to show ALL products on first page?

jnr

Avatar: jnr

2011-01-03 00:19

There is a solution for older version, but its not working for the newest one. I can't change/add categories for multiple products at once. Is there another way?

http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5161

» Quick.Cart v3.x

korekkorek

Avatar: korekkorek

2011-01-03 10:39

Przyłączam się do wątku.
Mnie jednak interesuje w jaki sposób zmienić, by zdjęcia wyświetlały się z konkretnego działu (kategorii, podkategorii), którą można będzie wybrać bezpośrednio w panelu.
Ktoś już to zrobił i mógłby podzielić się kodem, lub choćby wskazówkami którym plikom należało by się przyjrzeć? Będę wdzięczny.
Pozdrowienia

Korek

Makaron

Avatar: Makaron

2011-01-05 17:48

Wyświetlanie zdjęć realizowane jest przy pomocy funkcji listImagesByTypes() realizowanej w pliku actions_client/p.php. Drugi atrybut $iContent to zmienna przechowująca ID strony, na której aktualnie się znajdujemy. Jeśli wprowadzisz tam konkretny numer np. 3 to będą wyświetlane obrazy z podstrony o numerze ID 3. Możesz tej funkcji użyć tworząc nowy temat i przypisując go do danej podstrony: http://opensolution.org/Quick.Cart/docs/?id=tips#tematy_-_zmiana_wygladu_calej_strony_na_wybranej_podstronie
Myślę, że powinno się udać.

Mak-Web.pl - Quick.Cart & Quick.Cms templates

jnr

Avatar: jnr

2011-01-19 00:08

Any ideas about my problem?

boboo

Avatar: boboo

2011-01-19 08:29

The following solution is only to show ALL prods on the chosen page.
Step 1.
Add an entry in config/general.php
$config['all_products_page']=3;
(the number 3 in this example is the page ID on which all products should be shown).
Then add one more entry:
$config['show_all_products']=true;
(with true or false you can control the showing ALL prods).
Step 2.
in core/products.php find the function:
function generateProductsListArray($iContent)

and above!!! the line:
if(isset($aReturn))
paste the following code:
if(isset($GLOBALS['config']['all_products_page']) && $iContent == $GLOBALS['config']['all_products_page'] && $GLOBALS['config']['show_all_products'] === true){
$aReturn=null;
foreach($this->aProducts as $iProduct=>$aData){
$aReturn[]=$iProduct;
}
}

http://it-service.kimla.de

jnr

Avatar: jnr

2011-01-26 05:29

Thank you! This works perfectly in v3.7.

kuzco

Avatar: kuzco

2011-01-30 11:34

Hello,
I have tried this, but unfortunately noproduct will be shonw on page ("Alle Produkte" with ID 50).

$config['all_products_page'] = 50;
$config['show_all_products'] = true;

<?php
function generateProductsListArray$iContent ){
    if( isset( 
$this->aProducts ) ){
      foreach( 
$this->aProductsPages as $iProduct => $aData ){
        foreach( 
$this->aPages as $iValue ){
          if( isset( 
$aData[$iValue] ) && !isset( $aProducts[$iProduct] ) ){
            
$aReturn[] = $iProduct;
            
$aProducts[$iProduct] = true;
          }
        } 
// end foreach
      
// end foreach
      /**
      * rsBEGIN - ALLE Produkte auf eine Seite
      */
      
if(isset($GLOBALS['config']['all_products_page']) && $iContent == $GLOBALS['config']['all_products_page'] && $GLOBALS['config']['show_all_products'] === true){
      
$aReturn=null;
      foreach(
$this->aProducts as $iProduct=>$aData){
      
$aReturn[]=$iProduct;
      }
      } 
      
/**
      * rsEND - ALLE Prdukte auf eine Seite
      */
      
if( isset( $aReturn ) )
        return 
$aReturn;
    }
  } 
// end function generateProductsListArray

?>



any hint is welcome.

nadiesinweb

Avatar: nadiesinweb

2012-05-22 14:02

Hi.
I need also this function.
In my site (v4.2) I have added code from Boboo but it works without changes.

boboo

Avatar: boboo

2012-05-22 14:34

There is a "problem" in /actions-client/p.php we have to solve:
Line ~52:
$sProductsList=($aData['iProducts']==1||(isset($sPhrase) && $config['page_search']==$iContent))...
means, that the listProducts function will be called only if aData[iProduct]=1 or searching phrase exists.
This aData[iProduct] means: the option "products" on the page must be checked.
Otherwise, no products list.
To solve this we have to add something to the statement so the line will take the form:
$sProductsList=($aData['iProducts']==1||(isset($sPhrase)&&$config['page_search']==$iConten t)||$iContent==$config['all_products_page'])?...

qc-plugins.kimla.de

Back to top
about us | contact