Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

alex32

Archived
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Real Name
    Soeren

alex32's Achievements

  1. Thanks for your quick reply Mathew. Unfotunately that didn`t resolve my problem. I changed the code in my product_info.php to <?php // START: Extra Fields Contribution $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=".$products_id." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { echo stripslashes('<b>'.$extra_fields['name'].': </b>'); echo stripslashes($extra_fields['value'].'<BR>'); } // END: Extra Fields Contribution ?> but I still get the SQL Syntax error. It appears as soon as I click on a product in my product listing (so when visiting product_info). In admin I added a text field with no special characters. The values I enter i.e. green, yellow also have no special characters. The error occurs regardless for which language I create the text field. I`m not using a template system. All design modifications are in the core files! Do you have another idea, perhaps?
  2. Hi, I added Products Extra Fields v2.0 (9 Nov 2004) to my shop. Everything seems to work fine except for the folowing error message in my product_info.php 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'and ptf.products_extra_fields_value<>'' and (pef.languages_id=' SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM products_extra_fields pef LEFT JOIN products_to_products_extra_fields ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id= and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='2') ORDER BY products_extra_fields_order As my product_info is heavily modified I added right beneath <td class="productInfo" valign="top"><p><?php echo stripslashes($product_info['products_description']); ?> the following code: <?php // START: Extra Fields Contribution $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=".$products_id." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."') ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { echo '<b>'.$extra_fields['name'].': </b>'; echo $extra_fields['value'].'<BR>'; } // END: Extra Fields Contribution ?> I have Master Products installed, so I`m not sure if it has something to do with that. I'd appreciate your help ;-) thanks
  3. There are two menues in the newsletters admin panel to define footer/header. The first is called Standard Newsletter I think. Make modifications in the one below that. I have german version called "Kopf und Fuss Infos" (check in url that it is newsletters_extra_infos.php and not newsletter_extra_default.php). I would try the following: 1. Click on Newsletter Manager. 2. Click on add new newsletter. 3. At the top select as module "newsletter_subscribers". Enter a titel and a text and a pic below that, then click save. 4. Then lock the newsletter and click on preview. Click on "Kopf und Fuss Infos" or what it is called in english. I presume Header/Footer. 5. Now click on "New news item". At top you see Newsletter Id with dropdown menu next to that. Select from drop-down-menu the titel of the newsletter you defined. Write some text or an url in unsubscribe field 1. Then save. 6. Now send the newsletter from the newsletter manager. Don`t forget that you are sending a subscribers_newsletter. The errors shouldn`t occur when you send a normal newsletter.You will also see that the status newsletter sent works for the newsletter module. It doesn`t work for newsletter'_subscribers but you can still send it with module newsletter_subscriber.
  4. Hey Bongo, it seems you are running into the same problems as I had at the beginning. This is just a guess. Check if all of the subscribers have a "Last name". The field last name should not be blank. Which means if someone subscribes on the main page with his/her E-Mail Address and forgets to enter a name you will have to amend this manually. Just type it in the admin area. Second of all, check that every subscribers newsletter you define also has a header/footer assigned to it (you can check this via the newsletter ID). I would not delete header/footers in the admin panel. You will notice when adding a new subscribers newsletter, adjacently a new footer/header is added. That should solve your problem. To be honest this newsletter module is way from being perfect but it`s great that Loic is improving it i.e. adding html functionality, unsubscribe Link etc. So many thanks go to him!
  5. Hi Bongo, check if you sent the newsletter with the newsletter subcribers module or with the newsletter_module. If you use the latter then a newsletter is sent to all customers who wish to receive the newsletter (i.e. on creating account, in account history etc.). It is not sent to subscribers who wish to receive newsletters when entering their name and email on homepage. The status sent should work with the newsletter module. If you wish to send a newsletter to both customers and subscribers then use the newsletter_subscribers module. You must update your subscribers table in the newsletter admin panel first though. The status sent doesn`t work with with newsletter_subscribers module. If you wish to send a newsletter only to subscribers then do not update the subscribers table. Now I don`t want to confuse you but to be on the safe side I`ll mention what I do when sending a newsletter: I send the same newsletter twice but each person only gets one. I send it with the newsletter_module to customers with an unsubscribe link that updates the customers table and I send it to subscribers with the subscribers_module with an unsubscribe link that updates the subscribers table. I do not update the subscribers table via admin (removed the buttona and link). Now everyone gets a newsletter with the correct unsubscribe link. I know it sounds confusing but this works for me. Unfortunately the update subscribers table method does not update the customers table. If it would then things would be alot easier. Hope this helped! Hope that helps!
  6. Thanks for your reply. I noticed that when I add an unsubscribe url to the footer of a subscribers newsletter the subscribers E-Mail is added after "=". This is great! Now, when I send the newsletter in html the unsubscribe url is added but it is not in html-format. So the recipient can?t just click on it to unsubscribe. However if I send the newsletter in text- format the unsubscribe url is sent in html and is a clickable Link. I haven`t found a way to overcome this problem as I want to send my subscribers newsletter in html format. Perhaps you have a suggestion? While I looked for a solution with trial and error (I am no php-coder unfortunately) I found out a way to allow the status sent for newsletters_subscribers to work in the admin panel: In admin/newsletters_subscribers.php I replaced the following code around line 324: // $newsletter_query = tep_db_query("select newsletters_id, title, content, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" (int)$nID . "' and module = 'newsletter_subscribers'"); $newsletter_query = tep_db_query("select p.title, p.content, p.module, q.header, q.footer, q.unsubscribea, q.unsubscribeb from " . TABLE_NEWSLETTERS . " p, " . TABLE_SUBSCRIBERS_INFOS . " q where p.newsletters_id = '" . (int)$nID . "' and p.newsletters_id = q.newsletters_id and module = 'newsletter_subscribers'"); $newsletter = tep_db_fetch_array($newsletter_query); with: $newsletter_query = tep_db_query("select newsletters_id, title, content, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'"); $newsletter = tep_db_fetch_array($newsletter_query); The downside of this is that you can`t send any personalized header or footer (e.g. unsubscribe link) information. So what I did is add an unsubscribe link in my newsletter which leads to catalog/subscription_center.php of the old contribution. There the user can change his/her subscription status. This is obviously no ideal solution. I`m sure you have a better idea? Somewhere in the forums I read that if you remove all spaces in your newsletter html code (i.e. with a code scrambler) the layout of the newsletter should be perfect when opened by the recipient.
  7. Bonjour Loic and everyone else contributing on this great module, I`ve installed your version "newsletter_subscribers_v041" and it works fine Even on a heavily modified OSC-Shop! Thanks for your great work. There is one important question I have concerning the update of subscribers in the newsletter admin section. It seems this isn`t bidirectional. After updating the subcribers table the newsletter status in the customers table is imported to the subscription table. The customer can then easily unsubscribe using the appropriate E-Mail Link This means his status is deleted in the subscription table but unfortunately not in the customers table. He is still subscribed in the customers table. The next time I update the subscribers table the customers status is updated to "subscribed' (although he previously unsubscribed). Do you have an idea how the newsletter status can be changed to "Zero" in the customers table and in the subscription table when a customer unsubscribes? Or perhaps there is a way of updating the customers table with the subscription status in the newsletter table? Thanks for your comments in advance!
  8. Hi, I`ve just installed your neat contribution. How can I change it, that the additional eMail message will be written in a german order confirmation mail. At the moment this feature only applies for english confirmation mails. Thanks in advance! P.S Is it also possible to write the extra message in both language confirmation mails via admin?
  9. I`ve double-checked everything after merging your contribution. Perhaps it has something to do with the path I took when logging in. 1. I first select a product and add it to my cart 2. I then reach "my account information" (create_account.php) 3. I immediately click on "If you have ordered with us before ...login page 4. I reach "Sign in or create new profile" (login.php). I then enter my existing email-address but the wrong password. Nothing changes. I still see NOTE: Your "Visitors Cart" contents will be merged with your "Members Cart" contents once you have logged on (login.php/action/process). However if I enter a wrong email address I get the error message: "No match for 'E-Mail Address' and/or 'Password'". This is the message I would like to show up when entering the correct email address but wrong password. I don`t think this problem is associated with the login language file. I presume something is wrong in my login.php but where should I look? Sorry, the typical question from a "paster" who is a php novice.
  10. Hi Jack, thanks for your quick reply. I copy and pasted both files of your contribution in the appropriate folders. Perhaps you`d like to check this in your installation. Do you get an error message when entering a correct email address but wrong password?
  11. Hi Greg, this is the code in my categories.php at the line you are referring to: <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td> I replaced it with your code but unfortunately received an error. Do you also have the latest ultraimages installed? My categories.php is modified quite a lot because I couldn`t get ultraimages running. Chris had the same problem but fixed this and sent me his categories.php which I merged into my file (thanks alot Chris ;-). Here is some more code around that area. Perhaps you can see what the problem is. THANKS <?php } //Master Products $products_count = 0; if (isset($HTTP_GET_VARS['search'])) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_master, p.products_master_status, p.products_listing_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name"); } else { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_master, p.products_master_status, p.products_listing_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); } while ($products = tep_db_fetch_array($products_query)) { $products_count++; $rows++; //Master Products EOF // Get categories_id for product if search if (isset($HTTP_GET_VARS['search'])) $cPath = $products['categories_id']; if ( (!isset($HTTP_GET_VARS['pID']) && !isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['pID']) && ($HTTP_GET_VARS['pID'] == $products['products_id']))) && !isset($pInfo) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { // find out the rating average from customer reviews $reviews_query = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$products['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); $pInfo_array = array_merge($products, $reviews); $pInfo = new objectInfo($pInfo_array); } if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td> <?php if ($products['products_master_status'] == "1") { echo '<span style="color: #800080;">' . $products['products_name'] . ' (Master)</span></td>'; } elseif ($products['products_master'] != 0) { echo '<span style="color: #0080C0">' . $products['products_name'] . ' (Slave)</span></td>'; } else { echo $products['products_name'] . '</td>'; } ?> <td class="dataTableContent" align="center"> <?php if ($products['products_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?></td> <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } $cPath_back = ''; if (sizeof($cPath_array) > 0) { for ($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) { if (empty($cPath_back)) { $cPath_back .= $cPath_array[$i]; } else { $cPath_back .= '_' . $cPath_array[$i]; } } } $cPath_back = (tep_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : ''; ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo TEXT_CATEGORIES . ' ' . $categories_count . '<br>' . TEXT_PRODUCTS . ' ' . $products_count; ?></td> <!-- Master Products //--> <td align="right" class="smallText"><?php if (sizeof($cPath_array) > 0) echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, $cPath_back . 'cID=' . $current_category_id) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; if (!isset($HTTP_GET_VARS['search'])) echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_category') . '">' . tep_image_button('button_new_category.gif', IMAGE_NEW_CATEGORY) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_master') . '">' . tep_image_button('button_new_master.gif', IMAGE_NEW_MASTER) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_product') . '">' . tep_image_button('button_new_product.gif', IMAGE_NEW_PRODUCT) . '</a>'; ?> </td> <!-- Master Products EOF //-->
  12. Hi, first of all I would like to thank Matti for this great mod. This has solved so many problems for me (i.e it works great with eBay Auction Sales Manager because I don`t have to assign attributes anymore. My attributes are now slaves and I can synchronize these with my attribute-heavy eBay auction sales flawlessly ;-) However, I do have one small problem: When merging Matti`s code into my admin/categories.php the following shows in my admin-panel: I`m no coder just a paster, so if someone could perhaps tell me what I did wrong, that would be great! Thanks Alex
×
×
  • Create New...