Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

muskokee

Archived
  • Posts

    263
  • Joined

  • Last visited

Everything posted by muskokee

  1. OK... I DON"T WANT TO GO CRAZY JUMPING FOR JOY BUT.........WOOHOOOOOOOOO!! THAT DID IT!! :D :D With Chemo's contribution...the sessions.class.php and his three lines included in the external page: include_once('catalog/includes/configure.php'); include_once('catalog/includes/database_tables.php'); include_once('catalog/sessions.class.php'); and the new tep_href_link added to html_output.php: ////ROOT link FUNCION // The HTML href link wrapper function function tep_href_link_root($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $kill_sid, $HTTP_GET_VARS; global $request_type, $session_started, $SID; if (!tep_not_null($page)) { die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER; } else { $link = HTTP_SERVER; } } else { die('<br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if ($HTTP_GET_VARS['language'] && $kill_sid) { $l = ereg('[&\?/]?language[=/][a-z][a-z]', $parameters, $m); if ($l) { $parameters = ereg_replace("[&\?/]?language[=/][a-z][a-z]", "", $parameters); $HTTP_GET_VARS['language'] = substr($m[0],-2); } if (tep_not_null($parameters)) { $parameters .= "&language=" . $HTTP_GET_VARS['language']; } else { $parameters = "language=" . $HTTP_GET_VARS['language']; } } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } /* ORIGINAL if (isset($_sid) && ( !$kill_sid ) ) { $link .= $separator . $_sid; } */ if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) { $link .= $separator . '<osCsid>'; } elseif (isset($_sid)) { $link .= $separator . $_sid; } return $link; } and the links called to in this fashion: <a href="<?php echo tep_href_link_root('/index.php', '', 'NONSSL'); ?>" >Home</a> THE SESSION ID GETS PASSED TO EXTERNAL PAGES AND BACK AGAIN!!! B) Thank you sooo much Mark. It is so helpful when someone just drops a desperately need hint. Thank you for all you do on this board. I turn to your posts and advice quite often :) Sheri
  2. :'( No...I can only link to pages within the catalog with tep_href_link. I wonder....if I added a tep_href_link_root function and did not call the catalog directory? Sheri
  3. Hi Mark, I am really sorry, but I am not sure what you mean :( With regard to session id's I have ultimate seo urls installed as well as sid killer + buynow mod. I have prevent spiders: true, and a spider text file. I see the sid only when the cookies are disabled. My url links from the catalog to the root pages are just basic links, i.e. <a href="http://mysite.com/">Home</a> Should they have the sid attached to them? Sorry to be such a dolt. What other info could I provide you with? What code would you need to see? Getting the external session id's to work is really important to the design of my site. I am so happy that you responded to my posts. Thank you. :) :) Sheri *****EDIT***** OMG! Do you mean tep_href_link???? I'll try that right now! I have taken such care to use the function for all other links!!
  4. Other observations: I enabled my browser cookies and the session passes fine between external pages and the osc shop. The session data gets outputted and I can verify the cart contents. Linking back to the shop the cart contents remain. Is this contribution ONLY designed to work with cookies "on"? I wouldn't think so, as the info gets passed with cookies "on" regardless of this contribution. Sheri
  5. In fact, the session id is IN the address when I head back to the shop! Why are the cart contents not carried over??? WAIT JUST A MINUTE!! The session id changes everytime I click back to the shop!! I hope it's not my sid killer!! Sheri
  6. My store is located in a folder on my site. I am putting together other pages that are not connected with the shop. I have installed Chemo's external session contrib, which is a class file and an example file. I am trying in vain to get this to work. I have disabled my cookies and indeed, just as indicated the oscid is in the link back to the catalog. But when I go back to the catalog...no cart contents :'( Looked around the sessions class but there are no unique variables or info to specify. The contrib seems simple enough to get working and I am probably overlooking something. :-" If anyone has successfully gotten this contrib to work I would love to hear how!! Best, Sheri
  7. Not sure if anyone has told you Dennis but this fix worked for me!! Thanks bunches for a wonderful contrib :thumbsup: Sheri
  8. Solved it!!! Changed to this code in gbox if (($today_time - strtotime($featured_products_array[$i]['date_added'])) < 2592000) Silly me :P I named the field "date_added" and then tried to call "products_date_added"! Todd, do you mind if I post this featured products fix in the new icon support thread? Thanks again for your help! I think I'll add it to all the other combinations in case I change my mind on display in the future :rolleyes: Sheri
  9. Hi Todd, Thanks for the code! I finally gave it a go :blush: I get this error (4 times..probably because I have 4 products in the features right now) Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /home/*****/public_html/catalog/includes/modules/featured_gbox_products.php on line 196 I added the // added for New Product Icon contribution $today_time = time(); // end addition for New Product Icon contribution to the top of both featured_gbox and featured_sets. But it didn't make a difference. Then I added this to the featured products array: 'date_added' => $featured_products['products_date_added'], But alas... same warning appears :( Sorry to be a royal pain :-" I looked through the new icon contrib's read me but it seems that all has been done. If you have a minute??? :'( Sheri
  10. Thank you!!! I have used your code to hard-code it into my column :thumbsup: :thumbsup: I'll keep plugging away at the other code to see if I can get the array to behave properly :-" so that this could be a contribution that others could use. Thanks again! Sheri
  11. OK so, I got the admin side working. Database image field is populated for each currency. Upload works fine. Displays proper file name in admin currency. Started work on the catalog side (what is the use of only seeing it in admin?LOL). I am writing this in hard code until I have it solved...easier on the 'ol brain that way. I have finally managed to display each image in the array. HOORAY! That was a hard fought battle. Now all that is left to do is link the image input to the proper currency codes and values. I'll post what I have so far for the catalog side. in classes/currencies.php I just added the image to the array function currencies() { $this->currencies = array(); $currencies_query = tep_db_query("select code, title, currency_image, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES); while ($currencies = tep_db_fetch_array($currencies_query)) { $this->currencies[$currencies['code']] = array('title' => $currencies['title'], 'currency_image' => $currencies['currency_image'], 'symbol_left' => $currencies['symbol_left'], 'symbol_right' => $currencies['symbol_right'], 'decimal_point' => $currencies['decimal_point'], 'thousands_point' => $currencies['thousands_point'], 'decimal_places' => $currencies['decimal_places'], 'value' => $currencies['value']); In boxes/currencies.php this is what I have done: reset($currencies->currencies); $currencies_array = array(); $currencies_string = tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); while (list($key, $value) = each($currencies->currencies)) { $currencies_string .= '<input type="image" name="currency" src="images/'. $value['currency_image'].'" alt="'. $value['title'].'">'; } $currencies_string .= '</form>'; and $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => $currencies_string); Everything looks peachy. Here's the pagesource: How do I tie in the needed variables? i.e. code and value? Any help would be much appreciated! Sheri :thumbsup:
  12. I uploaded the image file to the proper directory, set the value through phpmyadmin and it registers in the admin side with proper file name. Am I missing an insert into sql query in my code? Sheri
  13. Thank you Todd :D I'll give it a whirl tonight! Sheri
  14. Hi all :D I am putting together a currency modification to remove the dropdown currency menu and have small currency icons in their place. I have some code that I have put together and seem to be at an impass. Admin side seems to function as intended but uploading is not working correctly...error:Warning, no file uploaded! Here is the code I have so far: In my database I created a new field called currency_image, varchar(64) NULL in table_currencies after "code". In admin/currencies.php I have added $currency_image = tep_db_prepare_input($HTTP_POST_VARS['currency_image']); 'currency_image' => $currency_image, to the $sql data array. A new upload if ($currency_image = new upload('currency_image', DIR_WS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CURRENCIES . " set currency_image = '" . tep_db_input($currency_image->filename) . "' where currencies_id = '" . (int)$currency_id . "'"); } All to the insert/save case. Changed this: $currency_query_raw = "select currencies_id, title, code, currency_image, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, last_updated, value from " . TABLE_CURRENCIES . " order by title"; to add the image. This to the case"new" $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->currency_image, $cInfo->title) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->currency_image . '</b>'); $contents[] = array('text' => '<br>' . TEXT_EDIT_IMAGE . '<br>' . tep_draw_file_field('currency_image')); This to the case "edit" $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->currency_image, $cInfo->title) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->currency_image . '</b>'); $contents[] = array('text' => '<br>' . TEXT_EDIT_IMAGE . '<br>' . tep_draw_file_field('currency_image')); This to the default $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->currency_image)); $contents[] = array('text' => TEXT_INFO_CURRENCY_IMAGE . ' ' . $cInfo->currency_image); ALL HAVE BEEN PLACED AFTER ANY CALL TO THE 'code" field. In admin/includes/classes/currencies.php I modified this function to reflect the image field: function currencies() { $this->currencies = array(); $currencies_query = tep_db_query("select code, title, currency_image, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES); while ($currencies = tep_db_fetch_array($currencies_query)) { $this->currencies[$currencies['code']] = array('title' => $currencies['title'], 'currency_image' => $currencies['currency_image'], 'symbol_left' => $currencies['symbol_left'], 'symbol_right' => $currencies['symbol_right'], 'decimal_point' => $currencies['decimal_point'], 'thousands_point' => $currencies['thousands_point'], 'decimal_places' => $currencies['decimal_places'], 'value' => $currencies['value']); } } I updated the english file to reflect the new constants. I have not modified the catalog side yet. One baby step at a time :-" Question...what else must I modify to allow the upload to occur? Thanks everyone. ;) Sheri
  15. Hi Todd, Thanks for your help B) I have only products featured on my store front...nothing else, anywhere else (I know what a waste of a great contrib! :blink: ) Set layout is #4: image, price over under Set style is #1: plain Boxgroup: gbox Thanks again, Sheri (mush for brains right about now)
  16. Hi once again Todd :D I have integrated the New Product Icon contrib into my site, so that when a customer reaches the product pages the new icon is present on recently added items. I would like to have the same icon display on the featured products that I have on my default index page. I have looked through your contribs files but have not been able to find an appropriate place to stick this code: // added for New Product Icon contribution // 2592000 = 30 days in the unix timestamp format if ( ($today_time - strtotime($listing['products_date_added'])) < 2592000) { $listing['products_name'] .= ' ' . tep_image_button('icon_newarrival.gif', TEXT_ICON_NEW_PRODUCT); } // end addition It is inserted after the PRODUCT_LIST_NAME case in product info.php. Where would I insert it in featured sets.php? TIA, Sheri :blush:
  17. Thanks Skylla. I do have the menu set at 70px. The menu width was an issue in the beginning but that was solved by changing it to 70px. Why IE has it "jumping" is beyond me. If it jumped while hovering and then slid back to it's original position then I could see that it was a hover or mouseover issue....but this darn thing jumps on hover and STAYS in the new position until page refresh, when it again cosies up to the left margin. I am completely stumped. IE AGAIN!!! What a beast. Sheri
  18. Thank you Mark. That would be fabulous. B) Would **love** to use udm. It offers so much control over the display of the menu. Best, Sheri
  19. So, I have abandoned trying to sort out the "selected" class. Javascript is not my thing. If you are around devosc I have an issue with IE that might require some easy adjustment to the script. What's happening is the menu is "jumping" to the right about 3px when you mouseover. On window refresh or action it realigns it self on the left. Thanks for your time. Sheri
  20. UPDATE I inserted this class change into the css file: .jcssMenu a.selected { font-weight: bold; background: #888; color: #ffffff;} .jcssMenu a:hover.selected{ font-weight: bold; background: #888; color: #ffffff;} This works when javascript is turned off. The path remains highlighted as gray through the whole path. When Javascript is on...no go. Sheri
  21. Hi, I have installed this contribution (FABULOUS! :thumbsup: ) ...thank you devosc :D Is there a way to keep the selected <a> class even after hovering? Right now, the menu shows the path beautifully when you attempt to navigate again...but as soon as mouseout occurs the selected path disappears. Thanks for your time :) Sheri
  22. What's not doable? Your questions are so broad I have no idea what you are asking. Can you sell custom computers? Can you organize your pages to look like that? Can you have mulitple options? Can you cross-sell? All of the above are a YES. There are many contributions that will help you achieve the website you are looking to build. Sheri
  23. Well, Wincompare did it again :-" :-" I have NO idea how a query in the boxes file got changed...but it did. I reverted back to the original line and PRESTO no more issues. Sorry to waste space on this thread :( Sheri
×
×
  • Create New...