Hi
Thanks for the query.
I have included below the catalog/includes/functions/paps_data_access.php file from the original distribution of PAPs version 0.7. Please check that you are using the same version before copying it into your file.
| Code: |
<?php
/*
$Id: catalog/includes/functions/paps_data_access.php,v 1.0 20:57:52 Nick Carter-Bond Exp $
by hanuman at Open Source Services
Demo at http://www.lannathaicrafts.com/plywood-doubleroof-gilded-spirit-house-p-60.html
Support and Forum at http://www.open-source-services.com/Forum/Product-Attribute-Pictures-PAPs-v0.5-for-osCommerce/
*/
function getAllPapsFilenames() {
$papsImageDir = DIR_FS_CATALOG . "images/paps";
$arrAllFilenames = array();
$allFileNames = array();
$dirHandler = opendir($papsImageDir);
while (false !== ($filename = readdir($dirHandler))) {
if(($filename != '.') && ($filename != '..')) {
$allFileNames[] = $filename;
}
}
closedir($dirHandler);
return $allFileNames;
}
function getHeadingSettings($attr_name, $model_no) {
$query_raw = tep_db_query("select show_att_name, show_att_vals from " . TABLE_PAPS_HEADINGS . " where product_model ='" . $model_no . "' and attr_name ='" . $attr_name . "'");
$query_results = tep_db_fetch_array($query_raw);
$arr = array("san" => $query_results['show_att_name'], "sav" => $query_results['show_att_vals']);
return $arr;
}
function getPicsPerRow($attr_name, $model_no) {
$query_raw = tep_db_query("select pics_in_row from " . TABLE_PAPS_HEADINGS . " where product_model ='" . $model_no . "' and attr_name ='" . $attr_name . "'");
$query_results = tep_db_fetch_array($query_raw);
$arr = array("pics_no" => $query_results['pics_in_row']);
return $arr;
}
function getImageWs($attr_name, $model_no) {
$query_raw = tep_db_query("select thumb_w, large_w from " . TABLE_PAPS_HEADINGS . " where product_model ='" . $model_no . "' and attr_name ='" . $attr_name . "'");
$query_results = tep_db_fetch_array($query_raw);
$arr = array("t_w" => $query_results['thumb_w'], "m_w" => $query_results['large_w']);
return $arr;
}
?>
|
Have you edited any of the source files? If so, let me know which ones. Also, are you using more than one set of attribute pictures for that particular model? Thanks for the info.
Nick