osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Adding e-mail function to review approval contribution

This is a discussion on Adding e-mail function to review approval contribution within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; I just added the "review approval" to my shop. It's for oscommerce but just had to change one extra string ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 11-20-2008, 03:58 PM
New Member
 
Join Date: Aug 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Gerald_1980 is on a distinguished road
Default Adding e-mail function to review approval contribution

I just added the "review approval" to my shop. It's for oscommerce but just had to change one extra string to get it to work in osCMax. There's an extra addon to get an e-mail whenever a new review had been added.

This is the howto on how to do this:
Code:
 
Find the following line in product_reviews_write.php(at or near line 51):
      tep_db_query("insert into " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text) values ('" . (int)$insert_id . "', '" . (int)$languages_id . "', '" . tep_db_input($review) . "')");
Insert this code:
  //notify store owner of new review to approve => added by Brian Christensen on 03-16-06
  $subject = 'Product Review';
  $message = 'There is a new product review awaiting approval';
  $from_name = 'Product Reviews';
  $from_email = 'reviews@YOURDOMAIN.com'; //change YOURDOMAIN.com to your store's domain
  tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $message, $from_name, $from_email);
  //end notify store owner
right before this line:
      tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action'))));
But my product_reviews_write.tpl.php looks like this:
PHP Code:
    <?php echo tep_draw_form('product_reviews_write'tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE'action=process&products_id=' $HTTP_GET_VARS['products_id']), 'post''onSubmit="return checkForm();"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading" valign="top"><?php echo $products_name?></td>
            <td class="pageHeading" align="right" valign="top"><?php echo $products_price?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
<?php
  
if ($messageStack->size('review') > 0) {
?>
      <tr>
        <td><?php echo $messageStack->output('review'); ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
      </tr>
<?php
  
}
?>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo '<b>' SUB_TITLE_FROM '</b> ' tep_output_string_protected($customer['customers_firstname'] . ' ' $customer['customers_lastname']); ?></td>
              </tr>
              <tr>
                <td class="main"><b><?php echo SUB_TITLE_REVIEW?></b></td>
              </tr>
              <tr>
                <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                  <tr class="infoBoxContents">
                    <td><table border="0" width="100%" cellspacing="2" cellpadding="2">
                      <tr>
                        <td class="main"><?php echo tep_draw_textarea_field('review''soft'6015); ?></td>
                      </tr>
                      <tr>
                        <td class="smallText" align="right"><?php echo TEXT_NO_HTML?></td>
                      </tr>
                      <tr>
                        <td class="main"><?php echo '<b>' SUB_TITLE_RATING '</b> ' TEXT_BAD ' ' tep_draw_radio_field('rating''1') . ' ' tep_draw_radio_field('rating''2') . ' ' tep_draw_radio_field('rating''3') . ' ' tep_draw_radio_field('rating''4') . ' ' tep_draw_radio_field('rating''5') . ' ' TEXT_GOOD?></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><?php echo tep_draw_separator('pixel_trans.gif''100%''10'); ?></td>
              </tr>
              <tr>
                <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                  <tr class="infoBoxContents">
                    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr>
                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
                        <td class="main"><?php echo '<a href="' tep_href_link(FILENAME_PRODUCT_NOTICEtep_get_all_get_params(array('reviews_id''action'))) . '">' tep_image_button('button_back.gif'IMAGE_BUTTON_BACK) . '</a>'?></td>
                        <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif'IMAGE_BUTTON_CONTINUE); ?></td>
                        <td width="10"><?php echo tep_draw_separator('pixel_trans.gif''10''1'); ?></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            <td width="<?php echo SMALL_IMAGE_WIDTH 10?>" align="right" valign="top"><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td align="center" class="smallText">
<?php
  
if (tep_not_null($product_info['products_image'])) {
?>
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '')">' tep_image(DIR_WS_IMAGES $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT'hspace="5" vspace="5"') . '<br>' TEXT_CLICK_TO_ENLARGE '</a>'?>');
//--></script>
<noscript>
<?php echo '<a href="' tep_href_link(DIR_WS_IMAGES $product_info['products_image']) . '" target="_blank">' tep_image(DIR_WS_IMAGES $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT'hspace="5" vspace="5"') . '<br>' TEXT_CLICK_TO_ENLARGE '</a>'?>
</noscript>
<?php
  
}
  echo 
'<p><a href="' tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' tep_image_button('button_in_cart.gif'IMAGE_BUTTON_IN_CART) . '</a></p>';
?>
                </td>
              </tr>
            </table>
          </td>
        </table></td>
      </tr>
    </table></form>
I'd like to implement this e-mailing feature into this file but I really don't know how to do it. Someone that got it working already care to explain me how they did it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 11-22-2008, 12:39 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 2,681
Thanks: 12
Thanked 214 Times in 196 Posts
Rep Power: 20
jpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud of
Default Re: Adding e-mail function to review approval contribution

Try looking at the correct file at the instructions suggest:

Find the following line in product_reviews_write.php(at or near line 51):

cause as you stated:

But my product_reviews_write.tpl.php looks like this.....

I found it no problem.
__________________
JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Review Approval System michael_s New osCommerce Contributions 0 09-15-2008 12:12 AM
adding a contribution to bts, is it too complicated? pefc2525 osCMax v2 Customization/Mods 2 03-25-2006 10:55 PM
Problems removing Review function InfernoX osCMax v2 Customization/Mods 5 10-27-2005 02:56 PM
Adding another contribution stetrk osCMax v1.7 Discussion 2 01-04-2005 08:23 PM
Contribution for adding multiple products jacven osCommerce 2.2 Modification Help 3 10-22-2003 08:23 AM


All times are GMT -8. The time now is 11:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design