• Hi,

    I have a WordPress site with Woo Commerce installed and the Yith request a quote plugin.

    I have categories with my product listings and then you can click on a product where you can add that product to a quote.

    Some of my products have options like you can get a quote on a candle holder with a candle or without a candle which changes the price. That all works fine.

    But what I have done is, I have created a modal preview of each product in the listing with a button that says “quick view”. The selected product in the list then pops up and you can then add that product to the quote list.

    The product does get added, but it then leaves out the options that you have selected. It just adds the product with the basic price.

    You can see a screenshot here of the listing: https://francdore.tinytake.com/sf/ODEyNjYzXzM2MDcxMzM

    You can see a screenshot here of the preview modal: https://francdore.tinytake.com/sf/ODEyNjY0XzM2MDcxMzQ

    Can anyone help?

    https://www.ads-software.com/plugins/yith-woocommerce-request-a-quote/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter francdore

    (@francdore)

    PS: I created the modal inside archive-product.php loop using this code:

    <div class="modal fade" tabindex="-1" role="dialog" id="preview-<?php echo the_ID(); ?>">
    	<div class="modal-dialog modal-lg">
    		<div class="modal-content">
    			<div class="modal-header">
    				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    				<h4 class="modal-title"><?php the_title(); ?></h4>
    			</div>
    			<div class="modal-body">
    				<div class="container-fluid">
    					<div class="row product-list-modal">
    						<div class="col-md-4">
    							<?php do_action( 'woocommerce_before_single_product' ); ?>
    							<div class="product-modal-image">
    								<?php do_action( 'woocommerce_before_single_product_summary' ); ?>
    							</div>
    						</div>
    						<div class="col-md-8">
    							<div class="product-modal-summary <?php
    									$cats = get_the_terms($post->ID, 'product_cat' );
    									foreach ($cats as $cat) {
    										echo $cat->slug . ' ';
    									}
    								?>">
    								<?php do_action( 'woocommerce_single_product_summary' ); ?>
    							</div>
    						</div>
    					</div>
    				</div>
    			</div>
    			<div class="modal-footer">
    				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    			</div>
    		</div>
    	</div>
    </div>
    Thread Starter francdore

    (@francdore)

    I also checked what was posted when you click the button.

    This is when you’re adding an item to the quote from the single product page:
    https://francdore.tinytake.com/sf/ODEyNjk3XzM2MDcyNTE

    This is when you’re adding an item from my modal that I created:
    https://francdore.tinytake.com/sf/ODEyNzAxXzM2MDcyNTU

    So it looks like the form isn’t posting the options form data.

    Thread Starter francdore

    (@francdore)

    Hey guys, thanks for the help (That was sarcasm).

    I fixed it using my javascript skills.

    I copied the plugin, renamed everything.

    What the plugin does is when you add your item to a quote on a single page, it submits all the fields that have a quantity and variation on the page. So if you have more than one product on the same page with a variation, all the products that come after the one that you’re trying to add to the quote list overrides the values of the one you’re trying to add.

    So what I did have I added a unique ID around the summary div that’s around the variation fields and quantity fields. Then I changed the javascript so that when you click the add to quote button, it only submits the fields that are within the summary container.

    So basically I can now add an add to quote button on a listing page using the free plugin.

    I can help you if you have the same problem.

    I had to copy and change the code on the original plugin.

    Let me know if this doesn’t make sense.

    Thread Starter francdore

    (@francdore)

    PS. You can view an example of what I did here: https://www.sittinginatree.co.za/product-category/decor-hire/

    Click on the “quick view” button.

    I did this because it’s a mission if people need to go into each product to add it to a quote list which takes forever. So they can now do it from the product listing page which is much faster.

    I also added form-control classes to the form inputs so that it’s styled with bootstrap.

    The next thing I’m going to try and do is add my own contact form using contact form 7.

    Dear Mr Francdore
    I am a begginer and so can not help you!
    But would you help me about:
    1) using the request a quote plugin that each user(buyer) can add non limited quantity of products in store to quote list without checking inventory of stock.
    2) How can I insert the “request a quote button” to the quick view

    best regards

    Dear Francdore
    can you help me out for inserting request quote button to the quick view page

    best regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Request a quote doesn't add all options in product preview popup.’ is closed to new replies.