Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mc12345678
Another user identified a similar issue to an extent, though identified the issue a different way. In the setup provided, a quantity of 1 was displayed as available although 0 was entered. There was a logic error in the zen_products_stock code that caused this issue. It has been resolved in the latest set of files for SBA 1.5.4 and as soon as I have compared the SBA 1.5.3 files against a vanilla install to validate that the only changes are those necessary to support the plugin changes. Haven't since been able to reproduce the problem described. So should be good to go with the newest files for SBA 1.5.4 and soon for SBA 1.5.3.
Do you by any chance have the code that needs to be changed in zen_products_stock to fix this problem? I've been too busy to test the new version for 1.5.1 and the site owner does not want it installed without lots of testing (I can understand that).
Mal
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
Malaperth
Do you by any chance have the code that needs to be changed in zen_products_stock to fix this problem? I've been too busy to test the new version for 1.5.1 and the site owner does not want it installed without lots of testing (I can understand that).
Mal
That issue is resolved in both versions. There remain some known issues that are primarily documented in the SBA 1.5.4 version of github. As they are resolved, they are carried over to the SBA 1.5.3 version.
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Zen Cart v1.54
SBA v1.54
Zen Magnific v1.5
So, I can get the main product image to change according to the attribute selected, but I've hit a brick wall when it comes to clicking on the attribute image to view its larger version.
I'm using a lightbox to display the larger images but for simplicity sake and to make it more relevant to this thread it might be best to use the stock SBA code in tpl_modules_main_product_image.php
Code:
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image(addslashes($products_image_medium),
addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT,'id="SBA_ProductImage"') . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
//--></script>
I think that the
Code:
FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']
has to be replaced with something like
Code:
$products_image_large, $products_name, LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT
with the $products_image_large being defined in \modules\main_product_image.php and I probably need to reference the 'attributes_image' field from TABLE_PRODUCTS_ATTRIBUTES
I'm stuck. Has anyone been able to get a larger version of the attribute image?
If it helps, the relevant bit of my lightbox (Zen Magnific) code in tpl_modules_main_product_image.php is
Code:
document.write('<?php echo $relBOF . '<a href="' . zen_magnific($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" class="' . "nofollow" . '" title="' . addslashes($products_name) . '">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT,'id="SBA_ProductImage"') . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' . $relEOF; ?>');
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Great, I've been able to get the large image of the attribute in my lightbox by using
Code:
$products_options->fields['attributes_image']
in the link to the larger image. Trouble is it only links to the last attribute in the set and doesn't 'switch' when SBA switches the main product image.
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
I added the previous post to the github repository to address this overall issue. I haven't looked into it yet, but it would seem that the overall process isn't taking into account the jscript/jquery (whatever was used) transformation/status of what is changed. Either, SBA isn't providing the modified image with the standard data to support the follow-on lightbox, or perhaps not the data necessary to support it.
Yes, providing
Code:
$products_options->fields['attributes_image']
as a substitution in the php will only result in the last attribute_image that has a value. Instead, there needs to be some form of javascript applied/available that would then serve/substitute the information necessary to move on to the next action of the lightbox displaying the desired image...
Overall, I believe that this feature is still in development although it has not been something that I have put focus on in comparison to the other functional aspects of the base SBA processing and display.
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mc12345678
I added the previous post to the github repository to address this overall issue. I haven't looked into it yet, but it would seem that the overall process isn't taking into account the jscript/jquery (whatever was used) transformation/status of what is changed. Either, SBA isn't providing the modified image with the standard data to support the follow-on lightbox, or perhaps not the data necessary to support it.
Yes, providing
Code:
$products_options->fields['attributes_image']
as a substitution in the php will only result in the last attribute_image that has a value. Instead, there needs to be some form of javascript applied/available that would then serve/substitute the information necessary to move on to the next action of the lightbox displaying the desired image...
Overall, I believe that this feature is still in development although it has not been something that I have put focus on in comparison to the other functional aspects of the base SBA processing and display.
Thank you for that. I think I also concluded that jscript was need to make the change - I had a play but to no avail.
As a workaround, I've copied the attribute images as additional images - this means that when the dynamically displayed attribute images are clicked a large version (additional images) are shown in the lightbox.
The issue with this is that the first image displayed in the lightbox is not always the same as the attribute that was clicked,
and the additional images on the product_info page need to be hidden.
Both of these I can live with for the time being.
Thanks again
Simon
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Apologies if this has been raised before, I did a search and did not find anything!
If I have a product where more than one attribute is set as "dropdown" then no attributes show up on the product listing. I mean there are no attributes shown to select or choose from.
Is there a fix for this or is it a feature :)
I have the latest plug in from the plugins section, classic template and v1.5.1.
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
marton_1
Apologies if this has been raised before, I did a search and did not find anything!
If I have a product where more than one attribute is set as "dropdown" then no attributes show up on the product listing. I mean there are no attributes shown to select or choose from.
Is there a fix for this or is it a feature :)
I have the latest plug in from the plugins section, classic template and v1.5.1.
This is partially a "feature". There are a few things. One verify the stock quantity in your admin for the product and it's individual variants. Basically if stock is present for one or more combinations of the attributes for that product and no choices appear on the product info page, then verify that the page passes html validation. If the attribute combinations are out-of-stock, you could setup the variants to be displayed with out-of-stock next to them. If however, it is not desired to identify out-of-stock, at the there is not yet a statement added to state that the product is out-of-stock and this results in "blank" being shown.
It is identified in the sequenced_sba_dropdown code where such a statement is needed, but it hasn't been written yet... It isn't expected to be difficult/complex, just hadn't done it yet and wasn't sure what wording would be desired. :)
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mc12345678
This is partially a "feature". There are a few things. One verify the stock quantity in your admin for the product and it's individual variants. Basically if stock is present for one or more combinations of the attributes for that product and no choices appear on the product info page, then verify that the page passes html validation. If the attribute combinations are out-of-stock, you could setup the variants to be displayed with out-of-stock next to them. If however, it is not desired to identify out-of-stock, at the there is not yet a statement added to state that the product is out-of-stock and this results in "blank" being shown.
It is identified in the sequenced_sba_dropdown code where such a statement is needed, but it hasn't been written yet... It isn't expected to be difficult/complex, just hadn't done it yet and wasn't sure what wording would be desired. :)
Thanks for your lightning fast reply.
I did check the stock quantities are OK, will do the other check :)
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
i am using SBA Version 1.5.4 for Zen Cart Version 1.5.4, but on zencart 1.5.3
is working, but with a few niggles
one of them being the sort order of colours, e.g. https://www.jarbon.com/alpaca-socks/...-country-socks, if you first select shoe size you will then see the colour options, these are in the incorrect order, as set in attributes controller
SBA is setting the sort order by attribute value ID, lowest first:
<select name="id[3]" onchange="i3(this.form);">
<option value="0" selected="selected">Next select colour</option>
<option value="18">Black </option><option value="21">dark green </option><option value="272">Red </option><option value="367">damson </option><option value="370">natural white </option></select>
this is overriding the order i set in attributes controller
i tried using the sort order you get when adding stock, but this didnt work
any ideas how this might be fixed?