Cyperis Posted August 7, 2012 Share Posted August 7, 2012 The way I have certain specifications set up, an item can have several values for the same specification name. The code I just showed currently shows like this: <p><strong>Spec Name 1</strong></p> <ul class=specification_box> <li> Spec1 Value 1</li> </ul> <p><strong>Spec Name 1</strong></p> <ul class=specification_box> <li> Spec1 Value 2</li> </ul> <p><strong>Spec Name 2</strong></p> <ul class=specification_box> <li> Spec2 Value 1 </li> </ul> <p><strong>Spec Name 2</strong></p> <ul class=specification_box> <li> Spec2 Value 2 </li> </ul> Im trying to get it to show the name of the specification once for all the values under that specification name. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted August 7, 2012 Author Share Posted August 7, 2012 Now I see what's happening. You have multiple values assigned to a specification for each product. The code in products_specifications.php doesn't handle that correctly. It's going to be necessary to split the SQL into two parts: One to get the name, and the second to loop through and get all of the values. This is going to take a bit of work. Unfortunately I don't have a lot of time to work on this right now. I'll see what I can do in a day or two. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Cyperis Posted August 7, 2012 Share Posted August 7, 2012 Oh, even more complicated than I had thought. Well time is not an issue with me as Im still far from being live. If you get time to look at it I would appreciate it but don't make it a priority. Thanks! Quote Link to comment Share on other sites More sharing options...
Gazonice Posted October 9, 2012 Share Posted October 9, 2012 Another potential fix for blank emails when the script is run by a CRON Job is to change the line: $text_file = basename ($PHP_SELF, ".php") . '.tpl'; to: $text_file = 'review_mail.tpl'; Assuming the template file resides in the same folder as the script and the filename has not been changed. This fixed my problem completely. Garry. Quote Garry Link to comment Share on other sites More sharing options...
llmc Posted August 2, 2013 Share Posted August 2, 2013 Is there a way to automatically log the customer in when they click to review? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted August 2, 2013 Author Share Posted August 2, 2013 Not without creating a huge security hole. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥stubbsy Posted September 18, 2013 Share Posted September 18, 2013 Hi there, I've just installed this and have it working but I'd like to send it to customers who have ordered in the last 30 days. At the moment, as per the instructions, all orders have a reminder_set status of 1 What I want to do it make that 0 for orders < 30 days old So something like this UPDATE orders SET reminder_sent = 0 where last_modified <= date/ time Any ideas how to finish it off :) Thanks Dave Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 18, 2013 Author Share Posted September 18, 2013 That's all you need. The "date/time" is a UNIX timestamp. You can find converters for that online. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥stubbsy Posted September 19, 2013 Share Posted September 19, 2013 Thanks for that, sorted :) Quote Link to comment Share on other sites More sharing options...
♥stubbsy Posted September 19, 2013 Share Posted September 19, 2013 Thanks Jim for an excellent addon. I've just backdated it so that any orders from the past 6 weeks will get emailed and I have reviews rolling in as we speak! Much appreciated Dave Quote Link to comment Share on other sites More sharing options...
shonus90 Posted June 18, 2014 Share Posted June 18, 2014 (edited) Big thanks Jim for all the work with this addon!! Installation went smoothly once I figured everything out but I know this thread is old but I have a question. How would you add the products images next to the product name? I have been toying around with it for time and can't seem to figure out how to have it call for the products_images. Here is how I have it right now // Get the products info for the order $products_query = tep_db_query ("select products_name, products_model, products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $orders_id . "'"); $orders_picture = tep_db_fetch_array($orders_picture_query); $orders_picture_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$order->products[$i]['id'] . "'"); $orderarray[$i] = array("Image" => "<img src=".HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $orders_picture['products_image']." width='90px' border='0'>");} // Get a list of products and links to the review page for each $products_string = ''; while ($products_array = tep_db_fetch_array ($products_query) ) { // Step through the products // Add each product and each review URL to a list $products_string .= $products_array['products_image'] . ' ' . $products_array['products_name'] . "\n"; $products_string .= ' ' . $link_server . DIR_WS_HTTPS_CATALOG . '/product_reviews_write.php?products_id=' . $products_array['products_id'] . "\n"; Thanks Edited June 18, 2014 by shonus90 Quote Link to comment Share on other sites More sharing options...
♥kymation Posted June 18, 2014 Author Share Posted June 18, 2014 You got things a bit out of order, but the basic idea is correct. Try this: // Get the products info for the order $products_query = tep_db_query ("select products_name, products_model, products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $orders_id . "'"); // Get a list of products and links to the review page for each $products_string = ''; while ($products_array = tep_db_fetch_array ($products_query) ) { // Step through the products $orders_picture_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_array['products_id'] . "'"); $orders_picture = tep_db_fetch_array($orders_picture_query); $image_string = '<img src='".HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $orders_picture['products_image'].'" width="90px" border="0">'; // Add each product and each review URL to a list $products_string .= $image_string . ' ' . $products_array['products_name'] . "\n"; $products_string .= ' ' . $link_server . DIR_WS_HTTPS_CATALOG . '/product_reviews_write.php?products_id=' . $products_array['products_id'] . "\n"; Not tested, so beware typos. Also make sure you are sending HTML email or the recipient won't see your images. Regards Jim shonus90 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
shonus90 Posted June 18, 2014 Share Posted June 18, 2014 (edited) Thanks again Jim!! I edited $image_string to correct a syntax error and this is how it looks now. $orders_picture_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_array['products_id'] . "'"); $orders_picture = tep_db_fetch_array($orders_picture_query); $image_string = '<img src='. DIR_WS_CATALOG . DIR_WS_IMAGES. $orders_picture['products_image'].' width="90px" border="0">'; So I have send Emails in HTML format enabled and the image boxes are appearing but the links are broken because this is how it is writing the image source www.jupiteroceansports.comdir_ws_catalogimages/hewlett_packard/lj1100xi.gif Any thoughts? Edited June 18, 2014 by shonus90 Quote Link to comment Share on other sites More sharing options...
shonus90 Posted June 18, 2014 Share Posted June 18, 2014 Figured it out just changed DIR_WS_CATALOG to DIR_WS_HTTP_CATALOG I am not used to using files without any styling to start out with so how might I say group the image, product name, and review together and say give spacing to the name and align it with the top of the image? Would I create divs with $products_string and everything else? Thanks Quote Link to comment Share on other sites More sharing options...
♥kymation Posted June 18, 2014 Author Share Posted June 18, 2014 (edited) Beat me to it. Use plain HTML to style your email. You can use embedded CSS as well. Try to keep it simple so your email doesn't take forever to load. Regards Jim Edited June 18, 2014 by kymation shonus90 1 Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Simpel Posted October 29, 2014 Share Posted October 29, 2014 Just wondering. Will it be possible when a customer order only above the 25 dollar. To give him automatic an discount over the email after a few days? Quote Link to comment Share on other sites More sharing options...
Simpel Posted December 13, 2014 Share Posted December 13, 2014 For me the add-on gives a problem that everybody who buy that the same day in my shop, get an email after a week. like cc, so they see each other how come? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted December 13, 2014 Author Share Posted December 13, 2014 This addon sends a separate email to every person on the list for that day. So no, that should not happen. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Simpel Posted October 22, 2015 Share Posted October 22, 2015 This addon sends a separate email to every person on the list for that day. So no, that should not happen. Regards Jim But not separated. The first who make an order that day get the email. But the rest of the people who make an order get the first mail as a CC. So when 10 people make an order the same day. The see the email addresses of each other. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 22, 2015 Author Share Posted October 22, 2015 @@Simpel This is still wrong. The code for this addon clearly sends a separate email to each customer,. There is no way that this code can combine emails. There is an email sent to the store admin with the number of emails sent that day. That is only an aggregate count and not a copy of the email sent to customers. It also does not send CC copies to anyone. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Simpel Posted December 1, 2015 Share Posted December 1, 2015 "There is an email sent to the store admin with the number of emails sent that day." ------ The ... review reminder script finished execution on28 Nov 2015 16:15:443 email messages were sent. ------ Every customer gets this email also and see each other. it seems the script search the database for the right time range and then send all the customers in that range the same email. instead of separated, the script send to all of them., so they automatic see each other. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted December 1, 2015 Author Share Posted December 1, 2015 There is no way for the code in this Addon to do this. Every email is sent separately using the osCommerce tep_mail() function. Each customer is sent a separate message, and the Admin message is sent only to the store owner. The only possible explanation for this happening is that some external program is aggregating the emails. I have no way to determine whether that is happening. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Psytanium Posted November 7, 2017 Share Posted November 7, 2017 Hello, the cronjob return those 2 errors [06-Nov-2017 16:00:01 America/Chicago] PHP Warning: require(../includes/configure.php): failed to open stream: No such file or directory in /home/macrotro/public_html/automatic/review_mail.php on line 45 [06-Nov-2017 16:00:01 America/Chicago] PHP Fatal error: require(): Failed opening required '../includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/macrotro/public_html/automatic/review_mail.php on line 45 The cronjob line : /usr/local/bin/php -q /home/user/public_html/automatic/review_mail.php What could be the problem ? thanks Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 7, 2017 Author Share Posted November 7, 2017 It sounds like your store is not installed in the root of your site. You need to change the path on line 17 of review_mail.php to reflect the actual path to your store's root. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Psytanium Posted November 10, 2017 Share Posted November 10, 2017 On 11/7/2017 at 6:53 PM, kymation said: It sounds like your store is not installed in the root of your site. You need to change the path on line 17 of review_mail.php to reflect the actual path to your store's root. Regards Jim but it is installed on the root directory, when I run http://macrotronics.net/automatic/review_mail.php I get : #!/usr/local/bin/php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.