Page 330 of 356 FirstFirst ... 230280320328329330331332340 ... LastLast
Results 3,291 to 3,300 of 3558
  1. #3291
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Trying some other options, rather than complicating matters, I switched from dropdown attributes to checkboxes, which actually worked out better than I thought for my theme.

    Click image for larger version. 

Name:	template.jpg 
Views:	42 
Size:	21.7 KB 
ID:	19243

    However the price is out of place in my design (mild OCDish) and I would like instead the red dot (sold) to be at the end on the other side of the price.

    I tried moving things around on includes/classes/observers/class.products_with_attributes_stock.php which is the file I determined controlled the elements, but nothing I tried worked as I was expecting, so my question is, how/where/what would I need to edit on that file to accomplish this? And if not that file, which file would it be?

    Thank you!!

  2. #3292
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mvstudio View Post
    Thank you for the reply! Forgot to mention the attribute in question is a dropdown menu. It's a shame that cannot be done with just simple CSS =(
    The website is www.manuelavalenti.com. If you register an account I'll approve you right away. I just have it private for now as I'm working on it, and don't want to display the "we're working" page.

    Question, if I decide to go the javascript route, would that entire dropdown be affected by say someone who has disabled java? Would it still be functional and perhaps instead display a "sold" text in place of a red dot?
    Good, that's the developer mindset to consider the effects of the change desired. The goal would be yes, present the desired information to support those that don't allow javascript and how it would look if it was supported. As of I think ZC 1.5.4 maybe 1.5.3, the attributes.php file included an html tag to encompass the entirety of the attribute option being displayed. This allows javascript to "takeover" that option name which allows the attribute to be displayed as desired.

    Now as to the latest question, first one back... is this product truly available without selecting either of the two checkboxes? If it is not possible for the product to "exist" without selecting a checkbox, then a checkbox is not likely the correct method of making a selection. Further, could the product ever exist if two or all checkboxes are marked? Again, if the answer to that is a no, then checkboxes are likely also not the type of selection to offer.

    My recommendation in those two cases would be to use a radio button option. Further, based on the information presented in the image of two options being provided with no default preselected would recommend adding a third option value that is marked as default and display only. Having this configuration would require the customer to actively make a selection to support giving notification to the customer when attempting to add the product to the cart that they... well, make a selection.

    Whether that default selection be shown on screen or not is up to css control.

    Now, to the topic of the OCD of display "style", what about what is presented is desired to be changed? If it is for the two (or more) options to be displayed more in a list than a horizontal grouping, that is controlled by css more than it is through the file referenced, but more information is needed to be able to advise. Some of that additional information may include the settings for dynamic dropdowns (admin->configuration->dynamic dropdowns) as those settings could have an effect that I am not expecting.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3293
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    Good, that's the developer mindset to consider the effects of the change desired. The goal would be yes, present the desired information to support those that don't allow javascript and how it would look if it was supported. As of I think ZC 1.5.4 maybe 1.5.3, the attributes.php file included an html tag to encompass the entirety of the attribute option being displayed. This allows javascript to "takeover" that option name which allows the attribute to be displayed as desired.

    Now as to the latest question, first one back... is this product truly available without selecting either of the two checkboxes? If it is not possible for the product to "exist" without selecting a checkbox, then a checkbox is not likely the correct method of making a selection. Further, could the product ever exist if two or all checkboxes are marked? Again, if the answer to that is a no, then checkboxes are likely also not the type of selection to offer.

    My recommendation in those two cases would be to use a radio button option. Further, based on the information presented in the image of two options being provided with no default preselected would recommend adding a third option value that is marked as default and display only. Having this configuration would require the customer to actively make a selection to support giving notification to the customer when attempting to add the product to the cart that they... well, make a selection.

    Whether that default selection be shown on screen or not is up to css control.

    Now, to the topic of the OCD of display "style", what about what is presented is desired to be changed? If it is for the two (or more) options to be displayed more in a list than a horizontal grouping, that is controlled by css more than it is through the file referenced, but more information is needed to be able to advise. Some of that additional information may include the settings for dynamic dropdowns (admin->configuration->dynamic dropdowns) as those settings could have an effect that I am not expecting.
    Thank you much for the reply!

    Good questions!

    The product in question is just a sample and I forgot to add the preselected option when I created the attributes. But the final products will have the "original painting" option as pre-selected as the first option (if available) or the limited edition prints pre-selected in those instances where the original painting is sold.

    In short, yes the product, which will be offered as original painting (1 unit) and limited edition print (several units typical 25-50 or more), can be purchased together in one go, if the customer desires, the reason why I decided to go for checkboxes instead of radio buttons. If I choose dropdown menus or radio buttons, customers wanting to add both options to the cart, would need to add them as two separate items in the cart, which isn't that big of a deal, but I thought checkboxes might give some flexibility. Perhaps I'm seeing this with the wrong pair of glasses? I have the tendency to use tools differently than the way they were intended to be used.

    What I'm trying to accomplish in this case of the checkboxes, assuming I picked the right option, is move the "red dot" which marks the piece as sold, to the end or the right side of the price, as shown in the picture below.

    Click image for larger version. 

Name:	template.jpg 
Views:	22 
Size:	22.2 KB 
ID:	19246

    I was able to pinpoint the line of code that displays the "sold" message which is controlled by the define PWA_OUT_OF_STOCK located on includes/classes/observers/class.products_with_attributes_stock.php at around line 368
    PHP Code:
            if (empty($products_options_DISPLAYONLY->fields['attributes_display_only'])) {
              
    $products_options_fields['products_options_values_name'] = $products_options_fields['products_options_values_name'] . PWA_OUT_OF_STOCK
    However I was unsuccessful at moving elements around to position the "sold" message, now displayed as a red dot, to the end. Again, I'm not good with php at all, I just play it by ear and through trial an error, tons of them. I'm only good at the design part and somehow manage for the most part to make things work the way I want them to.

    These are the setting for the dynamic dropdowns as requested:
    Click image for larger version. 

Name:	template2.jpg 
Views:	22 
Size:	160.3 KB 
ID:	19247

    Thanks again for taking the time =)

  4. #3294
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mvstudio View Post
    Thank you much for the reply!

    Good questions!

    The product in question is just a sample and I forgot to add the preselected option when I created the attributes. But the final products will have the "original painting" option as pre-selected as the first option (if available) or the limited edition prints pre-selected in those instances where the original painting is sold.

    In short, yes the product, which will be offered as original painting (1 unit) and limited edition print (several units typical 25-50 or more), can be purchased together in one go, if the customer desires, the reason why I decided to go for checkboxes instead of radio buttons. If I choose dropdown menus or radio buttons, customers wanting to add both options to the cart, would need to add them as two separate items in the cart, which isn't that big of a deal, but I thought checkboxes might give some flexibility. Perhaps I'm seeing this with the wrong pair of glasses? I have the tendency to use tools differently than the way they were intended to be used.

    What I'm trying to accomplish in this case of the checkboxes, assuming I picked the right option, is move the "red dot" which marks the piece as sold, to the end or the right side of the price, as shown in the picture below.

    Click image for larger version. 

Name:	template.jpg 
Views:	22 
Size:	22.2 KB 
ID:	19246

    I was able to pinpoint the line of code that displays the "sold" message which is controlled by the define PWA_OUT_OF_STOCK located on includes/classes/observers/class.products_with_attributes_stock.php at around line 368
    PHP Code:
            if (empty($products_options_DISPLAYONLY->fields['attributes_display_only'])) {
              
    $products_options_fields['products_options_values_name'] = $products_options_fields['products_options_values_name'] . PWA_OUT_OF_STOCK
    However I was unsuccessful at moving elements around to position the "sold" message, now displayed as a red dot, to the end. Again, I'm not good with php at all, I just play it by ear and through trial an error, tons of them. I'm only good at the design part and somehow manage for the most part to make things work the way I want them to.

    These are the setting for the dynamic dropdowns as requested:
    Click image for larger version. 

Name:	template2.jpg 
Views:	22 
Size:	160.3 KB 
ID:	19247

    Thanks again for taking the time =)
    I believe that after I posted my response I took a closer look at the original picture and realized that the change desired was as also just described above: text about option, price of option and then "marker"...

    So, the content of each of the attribute text listings is built "in time" with a standard everyday product's attribute with the additional text being applied to the option value "description" later on in the attributes.php file where the "price" is added. It is now after this addition that the SBA additional text is desired.

    So, in chasing down the sequence of addition within the ZC 1.5.7 version of the attributes.php (note as discussed above, SBA no longer needs to modify the attributes.php file in a template override directory, the default version works great!), the price is "added on" at/around the notifier: NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE. Additionally, in the above referenced file (includes/classes/observers/class.products_with_attributes_stock.php) there is a define that is used to "position" the customid. That define is PWA_DISPLAY_CUSTOMID. Where you see its "use" is well, where content revision could be done to position your "dot". The explanation of the "positioning" associated with that constant is provided near the beginning of the file and should help with templating the content location.

    Hmmm. Getting me thinking about the use of replaceable text instead of specific detailed information to increase sequence capability and such... I have other things to work on, but will see about making a note of it so that future changes can be made "smartly".
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #3295
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    I believe that after I posted my response I took a closer look at the original picture and realized that the change desired was as also just described above: text about option, price of option and then "marker"...

    So, the content of each of the attribute text listings is built "in time" with a standard everyday product's attribute with the additional text being applied to the option value "description" later on in the attributes.php file where the "price" is added. It is now after this addition that the SBA additional text is desired.

    So, in chasing down the sequence of addition within the ZC 1.5.7 version of the attributes.php (note as discussed above, SBA no longer needs to modify the attributes.php file in a template override directory, the default version works great!), the price is "added on" at/around the notifier: NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE. Additionally, in the above referenced file (includes/classes/observers/class.products_with_attributes_stock.php) there is a define that is used to "position" the customid. That define is PWA_DISPLAY_CUSTOMID. Where you see its "use" is well, where content revision could be done to position your "dot". The explanation of the "positioning" associated with that constant is provided near the beginning of the file and should help with templating the content location.

    Hmmm. Getting me thinking about the use of replaceable text instead of specific detailed information to increase sequence capability and such... I have other things to work on, but will see about making a note of it so that future changes can be made "smartly".
    After spending quite a few minutes looking for the define PWA_DISPLAY_CUSTOMID you mentioned, I realized I don't have installed ZC157 but ZC156c
    I picked up where I left before the pandemic hit, and somehow completely missed updating to ZC1.5.7!
    Back to the beginning

  6. #3296
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mvstudio View Post
    After spending quite a few minutes looking for the define PWA_DISPLAY_CUSTOMID you mentioned, I realized I don't have installed ZC157 but ZC156c
    I picked up where I left before the pandemic hit, and somehow completely missed updating to ZC1.5.7!
    Back to the beginning
    Well, while I commend you on ensuring that the store is up-to-date, the features I described are within the current github distribution and apply and/or are available without the ZC upgrade... Further, the ZC upgrade itself will not add the described additional code. That would still require download of the latest version from github...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #3297
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    Well, while I commend you on ensuring that the store is up-to-date, the features I described are within the current github distribution and apply and/or are available without the ZC upgrade... Further, the ZC upgrade itself will not add the described additional code. That would still require download of the latest version from github...
    I had thought about updating just the plugin to the latest version, but wasn't sure if it would work. Since I'm too close to the holiday season and need to have this up and running, I didn't want to risk making a bigger mess. On my way to install the latest version and implement the changes! Thank you! =)

  8. #3298
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mvstudio View Post
    I had thought about updating just the plugin to the latest version, but wasn't sure if it would work. Since I'm too close to the holiday season and need to have this up and running, I didn't want to risk making a bigger mess. On my way to install the latest version and implement the changes! Thank you! =)
    I'd make attempts to "fix" it if there were trouble at lowere ZC versions. :) Don't know "it's broke" sometimes though without someone throwing it out there...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #3299
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    I'd make attempts to "fix" it if there were trouble at lowere ZC versions. :) Don't know "it's broke" sometimes though without someone throwing it out there...
    I tried and boy did I try to reposition that little "red dot" within the file, and I just couldn't figure out what should have been placed where.
    So I cheated.
    I added a class to the image, and with CSS I made it float at the end.
    It works, at least for now.
    I will however when I have more time, figure out what needs to be edited, how and where, as I'm determined to learn and do things the right way.

    Thank you for the help! =)

  10. #3300
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    In ZC v1.57a (compared to v1.57) there are changes to

    admin/packingslip.php
    admin/invoice.php

    that make it difficult for me to incorporate the SBA edits - bit of a guessing game. Would it be possible to update the Github code at some point?
    Last edited by simon1066; 31 Oct 2020 at 06:57 PM.
    Simon

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR