marcus76
-
Posts
158 -
Joined
-
Last visited
Posts posted by marcus76
-
-
hi,
Can someone please help , i want to perform an IF statement on the 'product_id' of products contained within the wishlist.
i.e.
if ($products['products_id'] == 600) {
ThenDoThis
}
Can someone please give me some pointers with how i can list out the product_id's of the products in the wishlist? i'm guessing i want to run the IF statement against the wishlist array ? is there an array defined below?
My Wishlist file below:
Thanks
Marcus
<?php
/*
$Id: wishlist.php,v 3.0 2005/04/20 Dennis Blake
osCommerce, Open Source E-Commerce Solutions
Released under the GNU General Public License
*/
/*******************************************************************
****** QUERY THE DATABASE FOR THE CUSTOMERS WISHLIST PRODUCTS ******
*******************************************************************/
require_once(DIR_WS_LANGUAGES . $language . '/' . FILENAME_WISHLIST);
?>
<!-- wishlist //-->
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_CUSTOMER_WISHLIST
);
new infoBoxHeadingCSS($info_box_contents, false, false, tep_href_link(FILENAME_WISHLIST, '','NONSSL'));
$info_box_contents = array();
if (is_array($wishList->wishID) && !empty($wishList->wishID)) {
reset($wishList->wishID);
if (count($wishList->wishID) < MAX_DISPLAY_WISHLIST_BOX) {
$wishlist_box = '';
$counter = 1;
/*******************************************************************
*** LOOP THROUGH EACH PRODUCT ID TO DISPLAY IN THE WISHLIST BOX ****
*******************************************************************/
while (list($wishlist_id, ) = each($wishList->wishID)) {
$wishlist_id = tep_get_prid($wishlist_id);
$products_query = tep_db_query("SELECT pd.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) AS final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd) LEFT JOIN " . TABLE_SPECIALS . " s ON (p.products_id = s.products_id) WHERE pd.products_id = '" . $wishlist_id . "' AND p.products_id = pd.products_id AND pd.language_id = '" . $languages_id . "' order by products_name");
$products = tep_db_fetch_array($products_query);
$wishlist_box .= '0' . $counter . '. ';
$wishlist_box .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'], 'NONSSL') . '">' . $products['products_name'] . '</a><br/>';
$counter++;
}
$wishlist_box .= '';
} else {
$wishlist_box = '<div class="ShoppingCartBoxContents">' . sprintf(TEXT_WISHLIST_COUNT, count($wishList->wishID)) . '</div>';
}
} else {
$wishlist_box = '<div class="ShoppingCartBoxContents">' . BOX_WISHLIST_EMPTY . '</div>';
}
$info_box_contents[] = array('align' => '',
'text' => $wishlist_box);
new infoBoxCSS($info_box_contents);
?>
<!-- wishlist_eof //-->
-
I moved web host and now i find the Ajax Attribute Manager doesnt load when editing or creating a product??! - any ideas? there's no errors whatsoever just the attribute manager is now missing from the page?
Thanks
Marcus
-
hi,
I'd really like to only list the sessions that contain 'shopping_cart.php' over the past 24hrs. Does anyone have any suggestions to how i can change this query to only grab those sessions?
thanks
Marcus
-
hi,
I installed this contrib, works in admin but when i go to the front side (create single categories), the page loads and displays the list of categories, i can select them but when i click 'Continue' the page simply refreshes reloading 'pdf_catalogue_info.php' - can someone please advise what i need to check , i feel i'm so close to getting this working...the following is an snippet of the 'pdf_catalogue.info.php' where i believe the form is submitted:
I very much appreciate any pointers with this, it's driving me crazy.. :blink:
Regards
Marcus
//******************************************************************************** **************************************** if(!isset($GO_ON)){ //Neuerung v 1.6 by Michael Palmer //Anzeigen der Kategorien und auswahl über checkbox mit speicherung in einem Array //Übergeben des Array´s über Standardvariable da die Session durch behinderung der Admin-Session //nicht benutzt werden konnte!!!!! echo '<form action="" method="post">'; $i = 0; echo '<table><tr><td class="main">'; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { echo '<input name="KATEGORIE_SELECTED2['.$i.']" type="checkbox" value="'. $categories['categories_id'] .'">'. $categories['categories_name'] . $KATEGORIE_SELECTED2[$i].'<br>'; $i++; } echo '<input name="no_of_files" type="radio" value="one_file" checked="checked" />'. PDF_TXT_ONE_FILE.'<input name="no_of_files" type="radio" value="more_files" />'.PDF_TXT_ONE_FILE_PER_CATEGORY; echo '<input type="hidden" name="GO_ON" value="1">'; echo '<br><input type="hidden" name="ANZAHL" value="'.$i.'">'; echo '<input type="submit" name="submit" value="' . IMAGE_BUTTON_CONTINUE .'">'; echo '</form>'; echo '</td></tr></table>'; } if(isset($GO_ON) && isset($KATEGORIE_SELECTED2)){ //Neuerung v 1.6 by Michael Palmer //Bestätigung der ausgewählten Kategorien und abschicken des Formulars zur erzeugung der PDF echo tep_draw_form('pdf_quantity', tep_href_link(FILENAME_PDF_KATALOG, tep_get_all_get_params(array('action')) . '')); //echo "<form action=". FILENAME_PDF_KATALOG ." method=post>"; echo PDF_TXT_AUSWAHL ; $iCOUNT = 0; for ($i = 0; $i < $ANZAHL; $i++) { if ($KATEGORIE_SELECTED2[$i] != "") { $KATEGORIE_SELECTED[$iCOUNT] = $KATEGORIE_SELECTED2[$i]; $iCOUNT++; $categories_query = tep_db_query("select cd.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.categories_id= '$KATEGORIE_SELECTED2[$i]' and cd.language_id='" . (int)$languages_id ."' order by cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { echo "<b>".$categories['categories_name']."</b><br>"; break; } } } echo PDF_TXT_KLICK; //Array in Normale Variable Speichern damit die Daten mit einer iFrame weiter gegeben werden können!!!! for ($i = 0; $i < $iCOUNT; $i++) { if (!isset($KAT_SELECTED_ARRAY)) { $KAT_SELECTED_ARRAY = $KATEGORIE_SELECTED[$i]; } else { $KAT_SELECTED_ARRAY = $KAT_SELECTED_ARRAY."|".$KATEGORIE_SELECTED[$i]; } } //Übergeben der Anzahl, PDF_ACTION und Array Variable echo '<input type="hidden" name="file" value="'.$file.'"><input type="hidden" name="KAT_SELECTED_ARRAY" value="'.$KAT_SELECTED_ARRAY.'"><input type="hidden" name="PDF_ACTION" value="1">'; echo '<br><br><input type="hidden" name="no_of_files" value="'.$no_of_files.'"><input type="hidden" name="ANZAHL_KATEGORIEN" value="'.$iCOUNT.'">'; echo '<input type="submit" name="submit" value="' . PDF_TXT_GENERATE .'">'; echo "</form>"; } elseif(isset($GO_ON)) { echo '<font color="#FF0000">'.PDF_TXT_ERROR1 .'<a href="java script:history.back()" TARGET="_self">'.PDF_TXT_ERROR2 ."</a>".PDF_TXT_ERROR3; } //******************************************************************************** ****************************************
-
Wonderful contrib, it really works! :thumbsup: But I have 2 issues: First, how can I enable the prices to show in the rss feed?. The second one is how to get per-category feeds. Can someone give me a hint about this?
I too would like to know how to do the per-category feeds. I was thinking of creating a seperate rss.php file for each category and changing the MySQL query, i.e rsscat1.php, rsscat2.php...and so on...any clues to what i need to change on the database query side? - extract below to only query 1 category...
// Create SQL statement
$category = preg_replace('/[^0-9_]/', '', $_GET['cPath']);
$ecommerce = $_GET['ecommerce'];
if ($category != '') {
// Check to see if we are in a subcategory
if (strrpos($category, '_') > 0) {
$category = substr($category, strrpos($category, '_') + 1, strlen($category));
}
$catTable = ", products_to_categories pc ";
$catWhere = 'p.products_id = pc.products_id AND pc.categories_id = \'' . $category . '\' AND ';
}
$sql = "SELECT p.products_id, p.products_price, p.products_tax_class_id, p.products_model,
p.products_image, p.products_date_added, pd.products_name, pd.products_description,
m.manufacturers_name, cd.categories_name
FROM products p
$catTable
LEFT JOIN products_description pd
ON pd.products_id = p.products_id
AND pd.language_id = '$lang_id'
LEFT JOIN manufacturers m
ON m.manufacturers_id = p.manufacturers_id
LEFT JOIN products_to_categories p2c
ON p2c.products_id=p.products_id
LEFT JOIN categories_description cd
ON p2c.categories_id = cd.categories_id
AND cd.language_id = '$lang_id'
WHERE $catWhere
p.products_status=1 AND
p.products_to_rss=1
GROUP BY p.products_id
ORDER BY p.products_id DESC
LIMIT " . MAX_RSS_ARTICLES;
// Execute SQL query and get result
$sql_result = mysql_query($sql,$connection) or die("Couldn\'t execute query:<br />$sql");
-
JUst add this code where you want it displayed:
<?php reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($currencies->currencies); while (list($key, $value) = each($currencies->currencies) ) { if( $currency == $key ) $hidden_get_variables .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'currency=' . $key, $request_type) . '">' . tep_image(DIR_WS_ICONS . $value['image1'], $value['title'], '', '', 'align=absmiddle') . '</a> '; else $hidden_get_variables .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'currency=' . $key, $request_type) . '">' . tep_image(DIR_WS_ICONS . $value['image2'], $value['title'], '', '', 'align=absmiddle') . '</a> '; } $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => 'Currency: ' . $hidden_get_variables); new infoBox($info_box_contents); ?>
If the table or box is not required, you could rename the infoBox($info_box_contents) call and create a new infobox structure in includes/classes/boxes.php
hey Stu, i did the above, wondering if you can assist - i want to actually remove the box itself, when i view the source it places the currency flags etc within a table. I suspect it's the tableBox($info_box_contents); piece of code in the boxes.php. I just want to display the contents, no table formatting - any idea what i can remove from the below to make this happen?
function CurrenciesBoxContents($contents) {
$info_box_contents = array();
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => $contents[$i]['align'],
'form' => $contents[$i]['form'],
'params' => '',
'text' => $contents[$i]['text']));
}
return $this->tableBox($info_box_contents);
}
}
-
wondering if it has anything to do with register globals ?
-
hi,
I Installed the latest version of this today and get this message when I edit an Item:
'Session not registered - You cant access this page directly'
Brand spanking new install of OSC...
Any ideas what this could be?
Thanks
Marcus
-
hi, curious to know if anyone with this contrib installed has experienced an increase in sales.....
thanks
Marcus
-
hi
Anyone know how to 'hold' the selected sort order when changing categories. Every time i change into another category the sort order reverts back to the default 'bestsellers' - slightly annoying .
Regards
Marc
-
hi,
i get the same error:
Fatal error: Call to undefined function: tep_get_parent_categories() in /home/includes/seo_cache.php on line 175
Anyone find the fix for this?
Thanks
Marcus
Hello all,Having another very weird problem. I got the 2 mods (SEO URL's 2.0b and GoogleSiteMap) to work well on a CRE 6.15 site.
However, when I installed the same on a default MS2 version (slightly modded - no page cache), the SEO URL's work ok until I run the GoogleSiteMap. I use the cName method (can't use mod_rewrite). When I run GoogleSiteMap, I get this error:
and then the configuration data for SEO URL's gets updated to 2.1 (which does not support cName) and SEO URL's are broken. I have to delete the SEO_ fields from the configuration tables and run install-cache.php / install-seo.php again to setup the database.
Why is GoogleSiteMap updating my SEO URL's configuration data? Is there any fix for this? I didn't have this problem when I installed both contribs on a CRE 6.15 site.
Any help is always appreciated.
-
Hi,
Can someone please advise how I can change the emails that are sent as part of the tell a friend / send wishlist to be hyperlinks. Currently they are just sent as URL's which are not clickable.
Many thanks
Marcus
-
hi,
I'd like to know how people have found this contrib? whether they have noticed any upturn in sales?
Thanks
Marcus
-
All,
Is there anyway to display 2 columns of articles, and not list them down the page in 1 column?
Cheers
Marcus
-
help!!
I installed this contrib with absolutely no problems in my DEV site. I simply copied across the files to my LIVE site and i get the following error when i select a category:
Fatal error: Call to undefined function: tep_get_manufacturers_id() in /home/marc2834/public_html/includes/application_top.php on line 579
The code between the DEV and Live is the same?? any ideas? .htaccess changed to the root and updated as specified....
thanks
Marcus
-
wondering if anyone as a result of implementing this contribution has noticed an up-turn in sales?
thanks
Marc
-
I'm having the same prob - all i wanna do is store the originating URL string in the database - can someone help?
thanks
-
hello, can someone help - i've installed this, no problem, select Admin/Manufacturers and i have the additional fields for the meta tags, select Admin / categories and i dont see any fields for the meta details to go? have i done something wrong?
-
Hello,
Would someone please advise how i can remove the No Gift Wrapping statement and the price of ?0.00 on my invoice and only display Gift wrapping and the price when the giftwrapping option has infact been selected during the checkout process?
Many thanks
Marc
-
has anyone managed to get this to work? if so, would they mnd mailing me their product_info.php so i can take a clook and compare. I've been fighting with this contrib for hours. I have no errors on the page but when i add an attribute with an associated price i dont have the price update!
Many thanks
Marc
-
just to make this clear, i'm looking for the format to be the same as the first post in this thread.
Thanks
-
Would someone please copy/paste the new pricing from Royal Mail for all zones dated 8th May 2003.
Many thanks
Marc
-
Hi,
Does anyone have this contribution working with MS2 HTML WYSIWYG Editor, Product Desc, Email + ? I have both working well, except i cannot integrate the 2 into the admin\includes\categories.php ? lot of change going on in this file. If anyone can help, i'll post them the site. I'm currently having to create the HTML in frontpage and paste into the product box. I'm unable to create the HTML page within Oscommerce admin - until categories.php is fixed :(
Many thanks for your help in the past.
Marc
-
....similarly , i started with a base of OSC 2.2, installed
Master Products - MS2.
then
MS2 HTML WYSIWYG Editor, Product Desc, Email
Works ok, but i'm struggling getting the admin/categories.php working. Currently settled for designing my HTML page in frontpage and pasting the text into the box within OSC\admin - i havent updated the categories file to include the HTML contrib as i'd prefer the Master Products working completely.. It seems by leaving the updates of the HTML contrib i dont have the ability to edit the page within the OSc admin, but rather paste HTML into the box, which is then displayed correctly in the catalog.
So what i'd ideally like to do is get the Java applet working in categories.php so i can edit the pages within Osc admin without breaking the Master Products...anyone done this?
thanks
Marc
One Page Checkout Support
in General Add-Ons Support
Posted
Can some pls advise if 'Sage Pay Server' (http://addons.oscommerce.com/info/6984) is supported with the one page checkout.
Thanks
Marcus