Blocked - why?

idaryl

Avatar: idaryl

2007-02-20 07:10

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

I had a couple of questions over this but its been blocked - -?? -- Is there something with this that makes it a threat, or....

» Quick.Cart v2.x

treewood (OpenSolution)

Avatar: treewood

2007-02-20 07:53

idaryl - oh come on. You again? :)

i block topic because peoples dont read rules and they open new topic, give question, i will answer and after many times they ask in the same topic about something new ... but they dont know that 1 topic = 1 problem
Problem was solved ... topic was closed

idaryl

Avatar: idaryl

2007-02-20 12:06

Solved for thatdamnswede, but not for me

- I added the javascript code to a products page expecting it to display the uploaded image for that product but all I got was a blank page with an error message telling me the file does not exist, so where did I go wrong? Thats why I asked, its the same subject, not a new topic.

treewood (OpenSolution)

Avatar: treewood

2007-02-20 16:57

idaryl - upload this on server and give me link. i cant tell You what is wrong without example

idaryl

Avatar: idaryl

2007-02-21 07:33

I added this to the short description
A great companion for both boys and girls.<br>
<a href="javascript:windowNew( '$aList[sPhotoBig]' )">See Larger</a>

All I get is a blank page -- you can see it here -- click on the "Click to see larger" link:
http://www.carlsbadgallery.com/pillow/shop/?p=productsList&iCategory=3

treewood (OpenSolution)

Avatar: treewood

2007-02-21 08:11

idaryl - there is problem. Your variable $aList[sPhotoBig] is not recognized. I dont know why. You have plugin productsInRow. Check function throwProductsData() in plugins/productsInRow/productsInRow.php and that $aList[sPhotoBig] exits in this function

idaryl

Avatar: idaryl

2007-02-21 09:36

o boy - do I paste the entire page here - I found a couple of places where the $aPhoto[alist] is mentioned but.... no mention of the $aList[sPhotoBig] - so where does it go?

<?php

$iColumns = 2;

if( basename( $_SERVER['PHP_SELF'] ) != 'admin.php' ){
/**
* Display product list in columns, depending on the number set above ($iColumns)
* @return string
* @param string $sFile
* @param array $aData
* @param string $sPage
* @param int $iList
*/
if( !function_exists( 'throwProductsData' ) ){
function throwProductsData( $sFile, $aData, $sPage, $iList ){
global $tpl, $aList, $oFF;

$sFile = 'productsInRow.tpl';
$aPhoto = throwFirstPhoto( 1 );
$iCount = count( $aData );
$content = null;
$iColumns = $GLOBALS['iColumns'];
$aCategories = throwProductsCategories( );

$aList['iWidth'] = (int) ( 100 / $iColumns );

for( $i = 0; $i < $iCount; $i++ ){
list( $aList['iProduct'], $aList['sName'], $aList['fPrice'], $aList['sDescriptionShort'], $aList['iStatus'], $aList['iPosition'] ) = $aData[$i];

if( $i > 0 && $i % $iColumns == 0 )
$content .= $tpl->tbHtml( $sFile, 'TR' );

$aList['sNameUrl'] = change2Url( $aList['sName'] );

if( isset( $aPhoto[$aList['iProduct']] ) && is_file( DIR_PRODUCTS_FILES.$aPhoto[$aList['iProduct']]['sPhoto'] ) ){
$aName = $oFF->throwNameExtOfFile( $aPhoto[$aList['iProduct']]['sPhoto'] );
$aList['sFile'] = $aPhoto[$aList['iProduct']]['sPhoto'];
$aList['sPhotoSmall'] = DIR_PRODUCTS_FILES.$aName[0].'_m.'.$aName[1];
$aList['sPhotoBig'] = DIR_PRODUCTS_FILES.$aPhoto[$aList['iProduct']]['sPhoto'];
$aList['sPhoto'] = $tpl->tbHtml( $sFile, 'PHOTO' );
}
else{
$aList['sPhoto'] = null;
}

if( empty( $aList['sDescriptionShort'] ) )
$aList['sDescriptionShort'] = '&nbsp;';
else
$aList['sDescriptionShort'] = ereg_replace( '\|n\|', '', $aList['sDescriptionShort'] );

$aList['sCategories'] = throwTreeForProduct( $aCategories[$aList['iProduct']], $sFile );

$content .= $tpl->tbHtml( $sFile, 'LIST_LIST' );

} // end for

while( $i == 0 || $i % $iColumns > 0 ){
$content .= $tpl->tbHtml( $sFile, 'TD' );
$i++;
} // end while

$aList['sPages'] = countPages( $aData[0]['iFindAll'], $iList, $GLOBALS['iPage'], $sPage );
return $tpl->tbHtml( $sFile, 'LIST_HEAD' ).$content.$tpl->tbHtml( $sFile, 'LIST_FOOT' );
} // end function throwProductsData
}
}
?>

treewood (OpenSolution)

Avatar: treewood

2007-02-21 12:43

idaryl - yes You have variable: $aList['sPhotoBig'] defined in this function. Check for this:
$aList['sPhotoBig'] = DIR_PRODUCTS_FILES.$aPhoto[$aList['iProduct']]['sPhoto'];

Hmm.. then edit templates/productsInRow.tpl and variable have correct name -> $aList[sPhotoBig]
You have deleted example shop from server and i can check it

idaryl

Avatar: idaryl

2007-02-21 22:06

Site still there... tested the link.. seemed to work ok... ?

Should I be editing line 20 of productsinrow.tpl?

treewood (OpenSolution)

Avatar: treewood

2007-02-22 10:00

idaryl - give me link to productsInRow.tpl file. This file:
http://www.carlsbadgallery.com/pillow/shop/templates/productsInRow.tpl dont include Your modifications

idaryl

Avatar: idaryl

2007-02-22 20:43

I hav'nt changed it - the link above is correct - this is the original file I have

treewood (OpenSolution)

Avatar: treewood

2007-02-23 07:47

idaryl - then add this: <a href="javascript:windowNew( '$aList[sPhotoBig]' )">See Larger</a> to this file

idaryl

Avatar: idaryl

2007-02-23 21:37

where?

Back to top
about us | contact