Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

About athyholdt

Profile Information

  • Real Name
  • Website
  1. I would welcome a way to preserve the OsC session outside the cart. I am having the same issue, ie. I lose the session when I call the script externally. Cheers, Andreas
  2. Nvm, i got it now. Here it is if anyone else needs it. function crex_get_subcategories_xml($category,$args=array('language_id'=>'1')) { $sql_subcat_result = tep_db_query("select c.categories_id, cd.categories_name from ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd where c.parent_id = '".$category."' and cd.categories_id = c.categories_id and cd.language_id='" . (int)$args['language_id'] ."' order by c.sort_order, cd.categories_name"); $count_subcats= tep_db_num_rows($sql_subcat_result); while ($count_subcats) { $subcats = tep_db_fetch_array($sql_subcat_result); if (!empty($subcats)){ $subcats['cpath'] = tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category . '_' . $subcats['categories_id']); $return_value .= crex_xml_data_node(html_entity_decode(crex_xml_from_array($subcats))); } $count_subcats--; } return $return_value; }
  3. Hi again. I need an function that returns id, name and path of any subcategories in a given category as XML, and I can't get it to work. :blush: I could not find any such function among the OsC functions either. Any chance you could whip up something easily? Cheers, Andreas
  4. I understand. First I would like to say that this contrib is excellent, it will solve my need to have my products displayed in a MODx frontend. Thank you for the work you put into this. In my case, I don't use language ID 1, so there was no result returned. I didn't try using the language id in the URL as it was not in any of the examples or in the docs. Always pressed for time, this feature escaped me ;) I didn't look into how this function worked, but I assumed you pulled the default language from the database somewhere and that there was a bug somewhere in that code. As I look closer now, it seems you rely on the URL to provide the language, and then fall back to a preset default if no language is specified in the URL. It's ok too, but it was hard to guess upon first install and would surely trip up many international users ;) Changing this default value works well for me, and a note about setting this default value in the docs is all that is needed, imo. In my case I also had some minor issues with character encoding as the OsC database uses ISO-8859-1 and my CMS uses UTF-8. I had to convert the returned data to UTF-8 and change the charset as well as including the encoding tag in the doctype. Btw, is there a particular need for the ![CDATA[] tag of the data? Cheers, Andreas
  5. I found a bug that prevents output from being generated when you have products with status=0. The crex_get_category_products_xml function does limit the query to only active products, but the function fails to check for returned data before proceeding to the XML functions, thereby generating an error when the array is empty. To fix it, change the following code around line 296 in crex.php: $product_info = tep_db_fetch_array($product_info_query); //add the product as xml to our return value... $return_value .= crex_xml_data_node(crex_xml_from_array($product_info)); $counter ++; } to: $product_info = tep_db_fetch_array($product_info_query); //add the product as xml to our return value... if (!empty($product_info)){ $return_value .= crex_xml_data_node(crex_xml_from_array($product_info)); } $counter ++; } Cheers, Andreas
  6. There is a bug somewhere in the function that determines the language. This prevents the commands from returning just about anything. I have not tracked down the bug, but simply overridden the default value to be my own language. I suspect that is your problem too, as you say are japanese. Around line 33 the crex_read.php change: if (!$languages_id) $languages_id = '1'; to: if (!$languages_id) $languages_id = 'your_language_code'; I hope this helps. Cheers, Andreas
  7. I discovered that if I had more text in the description so that the morepics got pushed downwards, the problem disappeared. This works for me, I just have to come up with longer descriptions. Thanks for all the help. Cheers, Andreas
  8. Thanks for the swift reply, surfalot. I tried various alignment settings and also your suggestion to remove the alignment without it resolving the issue. The problem seem to be independent of browsers, I have tried Firefox, Safari and IE. I am sending you a PM with the URL as well as my product_info.php file if you feel inclined to further look into it. Cheers, Andreas
  9. Hi. I have a strange problem that I could not find an answer for in this thread. I use More Pics to display 6 pics beside the main pic. When I resize the browser window small enough they start to overlap. I expect this is somehow because they are both outputted using Javascript, but I could be wrong. My code is heavily modified and it may be something else that interferes with this. Here is a picture of the problem, I hope someone can help me solve this.
  10. Hello. I uploaded your code to my ISP and tried it on our site. It works without any problems here. I have to say it seems that your ISP is using som special settings or something to break the send function. Have you tried sending other emails from the site? Tell a friend, order confirmations and so on? Cheers.
  11. You probably have'nt remembered to change the require statement that actually reads in the language file in the beginning of feedback.php, so its still reading from the contact_us.php language file. Find near line 15: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); Change it to: require(DIR_WS_LANGUAGES . $language . '/' . 'feedback.php'); (or if you have defined your feedback.php in filenames.php, to your variable name, such as FILENAME_FEEDBACK) That should do the trick. Cheers.
  12. Sure, as long as I know how, I will try to help. Find this line at around 328 in your file (line numbers are from the text I copied from this subject) right after the echo (OPENING_HOURS) lines: <td width="1"> </td> change to: <td width="40"> </td> Substitute 40 with your desired width. PS: Whenever I try to modify tables, I always turn on the borders with a border="1" option in the table statement. That way it is much easier to see whats going on. Lately, I've started to use Firefox with the web developer extension to troubleshoot tables as I dont have to modify the source code to show the borders. Cheers :)
  13. To change the width alter this line around 499: <td height="0" width="547" valign="top" class="main"> to: <td colspan= "2" height="0" width="547" valign="top" class="main"> cheers :)
  14. Forgot one last line that needs to be edited for my previous post to work properly. Around line 35, find this: tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address); REPLACE it with: tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$auto_send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address);
  15. I solved my need for automatic recipients of the email based on the reason for the question. Find this line in the top section of contact_us.php around line 23: $emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT; INSERT this section right after: switch ($HTTP_POST_VARS['reason']) { case REASONS1: $auto_send_to = '1'; break; case REASONS2: $auto_send_to = '1'; break; case REASONS3: $auto_send_to = '0'; break; case REASONS4: $auto_send_to = '1'; break; case REASONS5: $auto_send_to = '1'; break; case REASONS6: $auto_send_to = '2'; break; default: $auto_send_to = '1'; } The numbers for the $auto_send_to variable refers to the sequence of the email addresses in the database, '0' being the first and so on. Change it to your own setup in reference to your reasons. Next, find this line just below: preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array); REPLACE it with: preg_match('/\<[^>]+\>/', $send_to_array[$auto_send_to], $send_email_array); I also commented out the whole section dealing with the recipient selection, you will find this around line 235. As you can see I just put HTML comments before and after. <!-- <?php if (CONTACT_US_LIST !=''){ echo SEND_TO_TEXT . '<br>'; if(SEND_TO_TYPE=='radio'){ foreach(explode("," ,CONTACT_US_LIST) as $k => $v) { if($k==0){ $checked=true; }else{ $checked=false; } echo tep_draw_radio_field('send_to', "$k", $checked). " " .preg_replace('/\<[^*]*/', '', $v); } }else{ foreach(explode("," ,CONTACT_US_LIST) as $k => $v) { $send_to_array[] = array('id' => $k, 'text' => preg_replace('/\<[^*]*/', '', $v)); } echo tep_draw_pull_down_menu('send_to', $send_to_array); } echo ; } ?> //--> Thats it. I found this very useful and I hope someone else can use it. Cheers.