Problems with addon: Dynamic Drop Downs for Stock By Attribute
Hi,
Is there a dynamic drop downs support thread for this add on? Couldn't find a thread so here goes...
I just added the dynamic drop downs add-on, I'm also running stock by attribute. The dynamic drop downs add-on seems to have removed all the stock numbers I had next to each attribute (not really an issue mind, I didn't like that feature), the problem is, I'm now able to add out of stock attributes and even the "select a size" value to the basket. It basically adds a product without any attributes at zero cost... which is a little annoying.
Anyone know a) how to fix this, or b) how to remove this add-on?
Thanks
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
Did you check first if the new addon touched ANY files that other add-ons also touched?
If there are like files then you need to merge the features/changes from them all into one file that is to be used
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
Just checked, the files uploaded when I added the dynamic dropdowns add-on don't touch any of the files uploaded when I added the stock by attributes add-on. Hmm, thanks though, i'll keep looking.
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
Sorted... it was the simplest of problems caused by an unnecessary line break, if anyone else reading this is having similar problems make sure you have no unnecessary line breaks in your code...
I copied this line of code right out of the dynamic drop downs read me document and pasted it into Dreamweaver:
Code:
define('TEXT_OUT_OF_STOCK', 'Out of stock');
define('TEXT_OUT_OF_STOCK_MESSAGE', 'The combination of options you have selected is currently out of stock. Please select another
combination.');
But there's a line break in the formatting between the words "another" and "combination". Dreamweaver carried this over and I didn't even notice. This is what caused the problems.
The code should be like this:
Code:
define('TEXT_OUT_OF_STOCK', 'Out of stock');
define('TEXT_OUT_OF_STOCK_MESSAGE', 'The combination of options you have selected is currently out of stock. Please select another combination.');
Thanks for your help kobra, wouldn't have looked twice at this if you hadn't prompted me.
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
Great!!
Somethings turnout to be basic coding errors...
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
I added these mods, and I'm also looking for a howto thread or faq. I don't need the stock functionality (everything is always in stock), but I would like the ability to control the content of only 2 of my 5 attribute dropdown boxes (I don't want it to apply to all attributes for my products).
Is there a way to do this? It's forcing me to select an option in dropdowns 3-n, when those are optional. My products always have the same attribute names. The value/prices changed based on what is selected in the first 2 attribute dropdowns.
And can I just default a 1 in for all quantities since I don't use them? And finally, if I decide to not go forward with this mod, is there a way to disable it without uninstalling? It turned my radio buttons into dropdowns, and that may be a deal-breaker.
Thanks in advance.
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
Anyone figure out if the issue mentioned in the above post was ever figured out? I'm desperate here....
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
Quote:
Originally Posted by laurenjj
Anyone figure out if the issue mentioned in the above post was ever figured out? I'm desperate here....
If no stock is required then there is no need for what was asked - -
Just adjust your admin > config > stock > settings
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
i installed the addon "Dynamic Drop Downs for Stock by Attributes
" and it works fine, it's just that now I am unable to add additional pictures.
Does anyone know how to do that?
I tried adding it the normal way in Attributes controller but it doesnt show up since I added the dynamic drop down addon.:cry:
Re: Problems with addon: Dynamic Drop Downs for Stock By Attribute
After much hair pulling, I've managed to come up with a sort of solution to my initial problem (and I believe a few other of your) problem...... which is how to use this mod when you have some products that have attributes OTHER THAN dropdowns because currently you can't....And I've gotten far and will post the entire work around when it's complete so I don't confuse anyone....but my current question may just be a simple zencart/mysql/php question:
I added a flagged field to the 'products' table via phpmyadmin then when the tpl_product_info_display.php page (includes/templates/YOURTEMPLATE/templates) loads, around line 134, right after where the code to 'display the product attributes' is, I have put in an if/else statement that says that if that product is 'flagged' then /tpl_modules_attributes.php will load, and if not, then /tpl_modules_attributesversion2.php will load. Now I know that statement works because
Code:
<?php
/**
* display the product atributes
*/
if ($_GET['products_id'] < 2) {
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
}
else {
require($template->get_template_dir('/tpl_modules_attributestemp.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributestemp.php'); }
}
?>
Will indeed load the one page for all products with a product_id less than2, and the other page for all others.... what I'm having a problem doing is changing the 'product_id' to the new 'flagged' field in the same table. I can indeed PRINT the 'flagged' value (either 0 or 1) by plugging in:
Code:
<?php echo $product_info->fields['flagged']; ?>
but I can't figure out how to correctly replace
Code:
if ($_GET['products_id'] < 2) {
with something like
Code:
if ($_GET['flagged'] = 2) {
...