Hello,
I have set the Out of Stock Status on one of my products to "Pre-Order". That causes the Availability to be shown as "Pre-Order" and causes the Add to Cart button to be a "Pre-Order" button, but the button is disabled. See the problem at:
www.skyreadyrc.com/store/index.php?rout ... duct_id=73
Does anyone know how to fix this?
Thanks,
Larry Sanford
I have set the Out of Stock Status on one of my products to "Pre-Order". That causes the Availability to be shown as "Pre-Order" and causes the Add to Cart button to be a "Pre-Order" button, but the button is disabled. See the problem at:
www.skyreadyrc.com/store/index.php?rout ... duct_id=73
Does anyone know how to fix this?
Thanks,
Larry Sanford
is there really such a PRE-Order Button built-in in your DEFAULT OC Version,
or do you use some Extension ?
Ernie
or do you use some Extension ?
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
No extensions. I just set the Out of Stock Status for a product to "Pre-Order" (it's in the dropdown, along with "Out of Stock", etc). The whole purpose of his is to allow customers to Pre-Order products that are out of stock.
But the Pre-Order button is disabled, and it shouldn't be.
But the Pre-Order button is disabled, and it shouldn't be.
I suppose this has somehting to do with your theme, and I can see it changes the button only on the main product's page, and not on the other places, like Category, Manufacturer, Search, etc., and I have a module (the Enabled version of the module) that can do exactly what you want:
https://www.opencart.com/index.php?rout ... on_id=4358
If you have any questions, feel free to write me a PM
https://www.opencart.com/index.php?rout ... on_id=4358
If you have any questions, feel free to write me a PM
See all my extensions: https://www.opencart.com/index.php?rout ... 20OpenCart
well, I don't install a v.2.3.x, just to find out, but I see NO single line of code in OC 2.3
to make this Pre-Order Button/Function to display or work, if no stock exists, so,
it must be related to your Custom 'theme708', and you better get in touch
with the Theme seller, to find out.
Good Luck
Ernie
to make this Pre-Order Button/Function to display or work, if no stock exists, so,
it must be related to your Custom 'theme708', and you better get in touch
with the Theme seller, to find out.
Good Luck
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
IP_CAM, I found the offending code in catalog\view\theme\theme708\template\product\product.tpl:
<!-- Add to cart form -->
<div class="form-group form-horizontal">
<div class="form-group">
<div class="col-sm-12 quantity">
<label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label>
<a class="counter counter-minus material-design-horizontal39" href='#'></a>
<input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="form-control"/>
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>"/>
<a class="counter counter-plus material-design-add186" href='#'></a>
<button <?php echo $stock_status <= 0 ? 'disabled' : ''; ?> type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="product-btn-add"><?php echo $stock_status <= 0 ? $stock : $button_cart; ?></button>
</div>
</div>
</div>
You can see that the <button> tag contains some php code that disables the button if $stock_status <=0. What it SHOULD be doing is something like this:
<button <?php echo $stock_status <= 0 && $out_of_stock_status != 5? 'disabled' : ''; ?>
An out of stock status of 5 is "Pre-Order", but the code above generates an error. I don't know exactly how to check for "Out of Stock Status = Pre-Order". There is currently no "$out_of_stock_status" variable to check, but there must be some variable I can check to see if the product has an Out of Stock Status set to "Pre-Order".
GoGo OpenCart: Your plugin looks good, and there are nothing but great comments from your customers, so they obviously love your product and your support. I will definitely check out your plugin, but for now, I just need the proper syntax for the code that will fix this. I need to know what the code would be for checking if "Out of Stock Status = 'Pre-Order'". Also, do you offer any other plugins for OpenCart 2.3.0.2? I would like to check them out.
Hoping someone knows how to fix the button tag above so that the button for a Pre-Order product is NOT disabled.
Thanks in advance!
Larry Sanford
<!-- Add to cart form -->
<div class="form-group form-horizontal">
<div class="form-group">
<div class="col-sm-12 quantity">
<label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label>
<a class="counter counter-minus material-design-horizontal39" href='#'></a>
<input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="form-control"/>
<input type="hidden" name="product_id" value="<?php echo $product_id; ?>"/>
<a class="counter counter-plus material-design-add186" href='#'></a>
<button <?php echo $stock_status <= 0 ? 'disabled' : ''; ?> type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="product-btn-add"><?php echo $stock_status <= 0 ? $stock : $button_cart; ?></button>
</div>
</div>
</div>
You can see that the <button> tag contains some php code that disables the button if $stock_status <=0. What it SHOULD be doing is something like this:
<button <?php echo $stock_status <= 0 && $out_of_stock_status != 5? 'disabled' : ''; ?>
An out of stock status of 5 is "Pre-Order", but the code above generates an error. I don't know exactly how to check for "Out of Stock Status = Pre-Order". There is currently no "$out_of_stock_status" variable to check, but there must be some variable I can check to see if the product has an Out of Stock Status set to "Pre-Order".
GoGo OpenCart: Your plugin looks good, and there are nothing but great comments from your customers, so they obviously love your product and your support. I will definitely check out your plugin, but for now, I just need the proper syntax for the code that will fix this. I need to know what the code would be for checking if "Out of Stock Status = 'Pre-Order'". Also, do you offer any other plugins for OpenCart 2.3.0.2? I would like to check them out.
Hoping someone knows how to fix the button tag above so that the button for a Pre-Order product is NOT disabled.
Thanks in advance!
Larry Sanford
The thing is that even if you sort it out on the main product's page, the button will still stay the same on the other places, so not sure if that will be of any help for you, but if you want, send me your email address via PM, so I can contact you, and I'll help you out with it on the main product's page
I try my best, and it's my duty to make sure that all of my modules are working as it should, without a problem, and all that comes with all those 5 stars votes and all the nice and positive comments about the modules and my fast and prompt help, for all of my modules Here's the list of all of my modules, you might find something else usefulglolar wrote: ↑Mon Jun 19, 2017 2:53 amGoGo OpenCart: Your plugin looks good, and there are nothing but great comments from your customers, so they obviously love your product and your support. I will definitely check out your plugin, but for now, I just need the proper syntax for the code that will fix this. I need to know what the code would be for checking if "Out of Stock Status = 'Pre-Order'". Also, do you offer any other plugins for OpenCart 2.3.0.2? I would like to check them out.
https://www.opencart.com/index.php?rout ... 20OpenCart
Those three are the most popular:
https://www.opencart.com/index.php?rout ... on_id=4098
And:
https://www.opencart.com/index.php?rout ... on_id=4358
And:
https://www.opencart.com/index.php?rout ... on_id=4067
Waiting for your email address
See all my extensions: https://www.opencart.com/index.php?rout ... 20OpenCart
I sent you an email, so please check it.glolar wrote: ↑Mon Jun 19, 2017 9:50 pmGo Go OpenCart, my email address is info@glolar.com.
Larry Sanford
See all my extensions: https://www.opencart.com/index.php?rout ... 20OpenCart
Who is online
Users browsing this forum: No registered users and 403 guests