Location: PHPKode > projects > Quick.Cart - free and simple to use shopping cart script > actions/products.php
<?php
unset( $sBasketPage );

if( isset( $aActions['a'] ) && is_numeric( $aActions['a'] ) ){
  $oProduct = Products::getInstance( );

  $iProduct = $aActions['a'];
  $sBasket  = null;
  $aData = $oProduct->throwProduct( $iProduct );
  if( isset( $aData ) ){
    if( !empty( $aData['sTemplate'] ) )
      $oTpl->setFileAlt( $config['default_products_template'] );
    else
      $aData['sTemplate'] = $config['default_products_template'];

    if( !empty( $aData['sTheme'] ) )
      $sTheme = $aData['sTheme'];
    if( !empty( $aData['sMetaKeywords'] ) )
      $sKeywords = $aData['sMetaKeywords'];
    if( !empty( $aData['sMetaDescription'] ) )
      $sDescription = $aData['sMetaDescription'];
    if( empty( $aData['sDescriptionFull'] ) )
      $aData['sDescriptionFull'] = $aData['sDescriptionShort'];
    $aData['sDescriptionFull'] = changeTxt( $aData['sDescriptionFull'], 'nlNds' );

    $aData['sPages'] = $oProduct->throwProductsPagesTree( $iProduct );

    $sTitle = strip_tags( ( !empty( $aData['sNameTitle'] ) ? $aData['sNameTitle'] : $aData['sName'] ).' - ' );

    $aImages = $oFile->listImagesByTypes( $aData['sTemplate'], $iProduct, 2 );
    $sFilesList = $oFile->listFiles( $aData['sTemplate'], $iProduct, 2 );

    if( $config['text_size'] == true )
      $oTpl->setIf( 'TXT_SIZE' );
    if( !empty( $aData['sAvailable'] ) )
      $oTpl->setIf( 'AVAILABLE' );
    if( isset( $aData['sPagesTree'] ) )
      $oTpl->setIf( 'NAVIPATH' );

    $oTpl->unsetVariables( );

    if( is_numeric( $aData['mPrice'] ) ){
      if( isset( $config['basket_page'] ) && isset( $oPage->aPages[$config['basket_page']] ) ){
        $sBasketPage = $oPage->aPages[$config['basket_page']]['sLinkName'];
        $oTpl->setIf( 'BASKET' );
      }
      $oTpl->setIf( 'PRICE' );
    }
    else
      $oTpl->setIf( 'NO-PRICE' );

    $content .= $oTpl->tBlock( $aData['sTemplate'], 'CONTAINER' );
  }
  else{
    header( "HTTP/1.0 404 Not Found\r\n" );
    $sTitle = $lang['404_error'].' - ';
    $content .= $oTpl->tBlock( 'messages.tpl', 'ERROR' );
  }
}
?>
Return current item: Quick.Cart - free and simple to use shopping cart script