Jump to content



Photo
- - - - -

Request Product Reviews


  • Please log in to reply
214 replies to this topic

#201   EchoGuns

EchoGuns

    Supreme Overlord

  • Members
  • 122 posts
  • Real Name:Clint Freeman
  • Gender:Male
  • Location:Texas

Posted 07 August 2012 - 05:23

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.
My Addons:

Product Tabs - 2.3x Download | Support
Product Info Page Box - 2.3x Download | Support

#202   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,023 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 07 August 2012 - 05:35

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

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#203   EchoGuns

EchoGuns

    Supreme Overlord

  • Members
  • 122 posts
  • Real Name:Clint Freeman
  • Gender:Male
  • Location:Texas

Posted 07 August 2012 - 05:38

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!
My Addons:

Product Tabs - 2.3x Download | Support
Product Info Page Box - 2.3x Download | Support

#204   Gazonice

Gazonice
  • Members
  • 92 posts
  • Real Name:Garry
  • Gender:Male
  • Location:Bradford, UK

Posted 09 October 2012 - 10:30

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.
Garry

#205   llmc

llmc
  • Members
  • 1 posts
  • Real Name:Lila

Posted 02 August 2013 - 18:38

Is there a way to automatically log the customer in when they click to review?

#206   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,023 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 02 August 2013 - 19:44

Not without creating a huge security hole.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#207   stubbsy

stubbsy
  • Members
  • 551 posts
  • Real Name:dave stubbs
  • Gender:Male
  • Location:Lyme Regis

Posted 18 September 2013 - 20:57

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 /smile.png' class='bbc_emoticon' alt=':)' />

Thanks

Dave

#208   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,023 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 September 2013 - 21:58

That's all you need. The "date/time" is a UNIX timestamp. You can find converters for that online.

Regards
Jim

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#209   stubbsy

stubbsy
  • Members
  • 551 posts
  • Real Name:dave stubbs
  • Gender:Male
  • Location:Lyme Regis

Posted 19 September 2013 - 09:11

Thanks for that, sorted /smile.png' class='bbc_emoticon' alt=':)' />

#210   stubbsy

stubbsy
  • Members
  • 551 posts
  • Real Name:dave stubbs
  • Gender:Male
  • Location:Lyme Regis

Posted 19 September 2013 - 12:53

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

#211   shonus90

shonus90
  • Members
  • 3 posts
  • Real Name:Patrick

Posted 18 June 2014 - 15:57

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 by shonus90, 18 June 2014 - 15:58.


#212   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,023 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 June 2014 - 16:26

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


My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#213   shonus90

shonus90
  • Members
  • 3 posts
  • Real Name:Patrick

Posted 18 June 2014 - 18:12

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 by shonus90, 18 June 2014 - 18:13.


#214   shonus90

shonus90
  • Members
  • 3 posts
  • Real Name:Patrick

Posted 18 June 2014 - 19:31

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



#215   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,023 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 18 June 2014 - 19:31

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 by kymation, 18 June 2014 - 19:33.

My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Price in Cart Only/MAPP Download Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support

Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated