You are here:  » Rating Comment Page on Product Page

Support Forum



Rating Comment Page on Product Page

Submitted by technoarenasol on Tue, 2012-10-30 13:55 in

Hi David

I added rating module into product page.actually I am create 3 tabs.First one compare price after that specification and third one rating tab ..but when I click on submit button it's not submitted..I also check Moderate Reviews page...

..
...
<div id="tabs-2">
      <br> <p> Description not available Description not available Description not available Description not available Description not available Description not available </p> <br>
    </div>
<div id="tabs-3">
<?php
  include("html/ratings.php");
?>

Submitted by support on Wed, 2012-10-31 09:05

Hi,

You probably just need to add the form handling code which you will find at the top of reviews.php, beginning at line 8 with:

  if (isset($_POST["submit"]))

...and down to line 29. Copy that code, and paste it into products.php at the same position - that should do the trick!

Cheers,
David.
--
PriceTapestry.com

Submitted by technoarenasol on Thu, 2012-11-01 07:06

technoarenasol

Hi Now submit function working but when I approve review on Moderate Reviews page

Error Display : Call to undefined function MagicParser_parse() in /home/cont/81/81/hml/prikart/mobile/includes/admin.php on line 608

Code of admin.php on 608.php : MagicParser_parse($config_feedDirectory."master.csv","myCustomRecordHandler","csv|44|1|34");

Submitted by support on Thu, 2012-11-01 08:39

Hi,

That's because of your custom feed mod that is built in to the backfill reviews process - to fix this, in admin/moderate.php look for the following code at line 4:

  require("../includes/widget.php");

...and REPLACE with:

  require("../includes/widget.php");
  require("../includes/MagicParser.php");

Cheers,
David.
--
PriceTapestry.com

Submitted by technoarenasol on Fri, 2012-11-02 08:49

technoarenasol

Hi David

Now approved process working but takes 40-60 seconds for one approval (I think its go to any loop process or due to master.csv file ) and after approval of rating and comment Its seen on product page .

Submitted by support on Fri, 2012-11-02 10:56

Hi Amin,

That will be because of your master.csv import process which is hooked into the admin_importReviews() function (as it is also called after any import).

The easiest fix for this will actually to put in a "dummy" MagicParser_parse() function! Referring to the modification described above, where you added this line:

  require("../includes/MagicParser.php");

...REPLACE with:

  function MagicParser_parse($a,$b,$c) { }

You'll then be able to use the Moderate Reviews function without the master.csv import taking place.

Cheers,
David.
--
PriceTapestry.com

Submitted by technoarenasol on Sat, 2012-11-03 11:06

technoarenasol

Hi David

After replacing function MagicParser_parse same times 40-50 second taking for approval

after approval of rating and comment not seen on product page .

Submitted by support on Sat, 2012-11-03 12:31

Hi Amin,

The reviews backfill process does operate against the entire products table so for a large site it may take several seconds - if you want to double check that the above mod worked OK as a final test you could comment out (or temporarily delete) the following code at line 562 in your includes/admin.php:

MagicParser_parse($config_feedDirectory."master.csv","myCustomRecordHandler","csv|44|1|34");

Regarding review content not being displayed, the select code needs to be added to your combined products.php. To do this, insert the following code:

  $sql = "SELECT * FROM `".$config_databaseTablePrefix."reviews` WHERE product_name = '".database_safe($q)."' AND approved <> '0' ORDER BY created";
  if (database_querySelect($sql,$rows))
  {
    $ratings["reviews"] = $rows;
  }

...just before this line in your modified version:

  require("html/header1.php");

Cheers,
David.
--
PriceTapestry.com

Submitted by technoarenasol on Sat, 2012-11-03 13:35

technoarenasol

Hi David

When I remove MagicParser_parse($config_feedDirectory."master.csv","myCustomRecordHandler","csv|44|1|34"); line on include/admin.php after that approve reviews within 2-3 seconds ....So please help me.....Thanks

Amin

Submitted by support on Sat, 2012-11-03 13:44

Hi Amin,

Here is an alternative method - replace the line but this time as follows:

global $noCustom;
if (!isset($noCustom))
{
  MagicParser_parse($config_feedDirectory."master.csv","myCustomRecordHandler","csv|44|1|34");
}

And then in admin/moderate.php look for the following code at line 27:

    admin_importReviews();

...and REPLACE with:

    $noCustom = TRUE;
    admin_importReviews();

Cheers,
David.
--
PriceTapestry.com

Submitted by technoarenasol on Sat, 2012-11-03 13:58

technoarenasol

Thanks David.Its works now