LemonStand Forum: Product Rating not recognized when selected - LemonStand Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Product Rating not recognized when selected jQuery - baseed on simplicity theme

#1 User is offline   Lucian 

  • LemonEvangelist
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 74
  • Joined: 06-April 11
  • LocationUSA

Posted 19 March 2012 - 02:09 PM

I've added product rating and actually posts a user review. Lemonstand knowledge-base lacks information on the the jQuery based theme and I couldn't find any info.

I have few issues as I needed to re-organize how partials are being pulled:

1. product rating does not get activated

If I select a star I get a flash error message that nothing is selected.

Here I'm sure is a jQuery issue as the review form is outside of the shop:product_partial, being pulled from the product_page directly.

On product_page - part of the code


			<!--product text-->
			<div class="product-text">
					<h1><?= h($product->name) ?></h1>
			  <? if ($product_unavailable): ?>
			    <h2>Product unavailable</h2>
			    <p>We are sorry, the product is unavailable.</p>
			    <p><a class="link_button" href="<?= root_url('shop')?>">Return to the Store</a></p>
			  <? elseif(!$product): ?>
			    <h2>Product not found</h2>
			    <p>We are sorry, the specified product cannot be found.</p>    
			    <p><a class="link_button" href="<?= root_url('shop')?>">Return to the Shop</a></p>
			  <? else: ?>
			    	<div id="product_page"><? $this->render_partial('shop:product_partial') ?></div>
			  <? endif ?>
				
			</div>
			<!-- product reviews -->
			<div id="product_page_review" class="product-reviews">
			<? $this->render_partial('shop:product_reviews') ?>
  			<? $this->render_partial('shop:add_review_form') ?>  	
			</div>
		</div>


On shop:add_review_form, I believe this line is messing up everything:

<?= open_form(array('onsubmit'=>"return $(this).sendRequest('shop:on_addProductReview', {onAfterUpdate: init_effects, extraFields: {no_flash: true}, update:{'product_page_review': 'shop:product_partial'}})")) ?>


I don't understand this line. Why is it required the shop:product partial in the call? Is the page ID not enough? (which is also changed.)
update:{'product_page_review': 'shop:product_partial'}


2. When it gets posted there is no message and I need to refresh to see the change

This part doesn't take effect:
<? if (isset($review_posted)): ?>
  <p class="flash success">Your review has been successfully posted.</p>
<? else: ?>



3. How would I go on initializing the form directly?

Currently you need to push this button, otherwise the rating stars don't show up:

<p id="review_trigger"><a href="#" class="link_button" onclick="$('#review_trigger').addClass('hidden'); $('#review_form').removeClass('hidden'); $('#review_title').focus(); init_rating_selector(); return false">Write a review</a></p>

0

#2 User is offline   Lucian 

  • LemonEvangelist
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 74
  • Joined: 06-April 11
  • LocationUSA

Posted 28 March 2012 - 03:24 PM

It seems it was a bug with the Rating Selector. There is an update available.
http://orkans-tmp.22...et/star_rating/
0

Share this topic:


Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users