Page 4 of 5

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Thu Dec 12, 2013 12:12 pm
by DavJames
On a fresh default OpenCart 1.5.6 installation I did nothing apart from activate the Latest module on the homepage. I see this error on the top of the page:

Notice: Undefined variable: product_info in /home2/david2/public_html/mysite.com/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice: Undefined variable: product_info in /home2/david2/public_html/mysite.com/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51Notice:

When I deactivate that module I don't get the problem.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Fri Dec 13, 2013 8:43 am
by OC2PS
garywinner wrote:I installed in on my OC 1.5.6 but it doesn't work
Are you sure you installed the correct version of the extension for your version of OpenCart?

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Fri Dec 13, 2013 8:49 am
by OC2PS
DavJames wrote:On a fresh default OpenCart 1.5.6 installation I did nothing apart from activate the Latest module on the homepage.
Are you sure you are using v1.5 of the extension? That's the version compatible with your version of OpenCart.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Mon Dec 30, 2013 2:40 pm
by ikanperak
I'm new to Opencart and I am testing ver 1.5.6. I agree with the author that a customer should not be able to add to his cart, stuff that is not there. I would expect it to be a standard OC feature. Anyway, this module works, only if I disable 'Bestsellers' and 'Latest'. Is that how it should work? I get the errors below (both with default and custom theme):

Code: Select all

Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 43Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 44Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 43Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 44Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 43Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 44Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 43Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 44Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 43Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_bestseller.php on line 44Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice: Undefined variable: product_info in /home/silverfi/public_html/opencart/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Tue Dec 31, 2013 3:34 pm
by ikanperak
Okay, this might be the problem. Although the download page says its version 1.5, the actual file in the xml folder indicates that it's version 1.4.1.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Wed Jan 01, 2014 3:07 pm
by OC2PS
I'll have a look and get back in the next couple of days.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Wed Jan 08, 2014 1:56 am
by cooksystem
Slightly change the xml to implement it on my site but can not find the products related variable which changes only the product with the available quantity to 0, because if I have one in products related with stock and other stocks without the two shows me the same botton, the code is capturing the existence of the article in which we are not in the related product.

Code: Select all

<file name="catalog/view/theme/default/template/product/product.tpl">
		<operation>
			<search position="replace"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />]]></search>
			<add><![CDATA[
			<?php if ($stock_qty <= 0) { ?>
			<a href="index.php?route=information/contact&subject=<?php echo $heading_title; ?>" class="button">Quote</a>
			<?php } else { ?>
			<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
			<?php } ?>
			]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>]]></search>
			<add><![CDATA[
			<?php if ($stock_qty <= 0) { ?>
			<a href="index.php?route=information/contact&subject=<?php echo $product['name']; ?>" class="button">Quote</a>
			<?php } else { ?>
			<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
			<?php } ?>
			]]></add>
		</operation>	
	</file>

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Sun Jan 12, 2014 5:28 am
by fastkiss
I am using OC 1.5.6.1, this mod work fine in products page but it causes problem if there is any out of stock products in Featured, Lastest or Bestsell.
The error message is:

Undefined variable: product_info in /vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice:
Undefined variable: product_info in/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51Notice:
Undefined variable: product_info in/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 50Notice:
Undefined variable: product_info in/vqmod/vqcache/vq2-catalog_controller_module_latest.php on line 51

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Thu Jan 23, 2014 9:44 am
by toad78
I, too, am experiencing an issue with this plugin.

Information:
OpenCart 1.5.5.1
vQmod: 2.0-beta.6

I downloaded the file 'V 1.2' and followed the instructions to 'install' it. The screenshot provided shows my product's settings. In the frontend, I still see 'Add to Cart' button on the product.

Recommendations?

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Thu Jan 23, 2014 12:21 pm
by OC2PS
toad78 wrote:I still see 'Add to Cart' button on the product.
Thanks for providing your config info. One question: Are you using the Default theme?

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Fri Jan 24, 2014 2:00 am
by toad78
What I've done is made a duplicate of the default template files and modified most of the layout via css. So I haven't touch the code itself.

You can see it here. The Pastuerized 8oz SHOULD NOT have an Ad to Cart button.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Tue Jan 28, 2014 5:21 am
by toad78
I'm curious, is there a way to add in addition to your code to remove the Qty box as well? It doesn't seem to make sense to have the 'Add to Cart' removed while the Qty box is still present.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Tue Jan 28, 2014 8:46 pm
by OC2PS
toad78 wrote:remove the Qty box as well?
Thanks for the feedback. Makes sense. I will consider for next version.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Tue Jan 28, 2014 9:41 pm
by toad78
Would it be released soon? I have a site that could use this implementation.

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Fri Jan 31, 2014 6:55 am
by KnightUK
Can you customise this to work with the SportStore theme?
Willing to pay for this if needed

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Tue Feb 04, 2014 1:11 am
by OC2PS
KnightUK wrote:Can you customise this to work with the SportStore theme?
Willing to pay for this if needed
Sure, please PM me

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Tue Feb 11, 2014 7:37 pm
by bgcrop
I have pm you but no reply...

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Thu Apr 03, 2014 6:10 pm
by avanes
Hello and thank you for your fantastic extension.
I've run into a bit of a trouble and wonder if you might be able to help me.
While installing another module, I, by mistake, overwrote the contents of vqmod > xml folder. Now I've placed your xml file back in place but it isn't working any more. I'm wondering why it isn't working and whether you have encountered this before.
Thanks

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Thu Apr 03, 2014 6:55 pm
by avanes
ok, problem solved!!
the important vqmod_opencart.xml file was missing!

Re: @tik Remove Add to Cart button for Out of Stock items

Posted: Wed Jun 04, 2014 8:03 pm
by Kaiketsu
i have just come across this and having issues. sorry to revive a dead topic but this seems more relevant.
ikanperak wrote:Okay, this might be the problem. Although the download page says its version 1.5, the actual file in the xml folder indicates that it's version 1.4.1.
i also get the following error on my default theme for both in stock and out of stock items:

Code: Select all

 Undefined variable: stock_qty in site_data/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_product.tpl on line 228 
Notice: Undefined variable: stock_status in site_data/vqmod/vqcache/vq2-Catalog_view_theme_default_template_product_product.tpl on line 229
anyone solve this? im using OC 1.5.6.4