Announcement

Collapse
No announcement yet.

Push Button Grid with Out Of Stock Buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Push Button Grid with Out Of Stock Buttons

    Dear All

    I hope this is of some help as I have been working on this for a while. I would also like to credit Bangers for helping me debug it.

    This amendment will allow you to have buttons in the push button grid replaced with an out of stock graphic, thereby stopping customers clicking on an out of stock item and getting that annoying 'your choice is not available' screen.

    This code also includes the fix to the product reference problem posted by Norm at:
    http://community.actinic.com/showthread.php?t=35114

    It also includes the code in the thread below which puts the table into rows when there is only one attribute:
    http://community.actinic.com/showthread.php?t=28012

    This amendment alters the push button grid layout and the actinic_main.php. Please save copies of these before you proceed. Also, please note for the changes in the actinic_main.php to take effect you will have to close actinic and restart it.

    First of all open the 'Add to cart Push Button' layout and replace all of the code with the code in the text file below.

    When you have done that you will need to create two new layouts and selectors.

    I am going to assume some knowledge on this and describe this briefly.

    Create one layout for the smaller add cart button and one for the out of stock graphic. This can be done by going into the library under 'Add to Cart Button' and making copies of the 'Add to Cart Button Image' layout and renaming them 'PushButtonGridButton' and 'ButtonOutOfStock'.
    Then create the selectors by copying the AddToCartButton and renaming them 'PushButtonGridButton' and 'ButtonOutOfStock' making sure they are set to the relevant layouts.

    Once you have done that close actinic and copy the code from the actinic_main.txt below and replace all of the code in actinic_main.php which you will find in C:\Program Files\Actinic v8. Don't forget to back your original version!!

    Once complete, restart actinic and it should all be working for you. You will see from the code that you have more options to customise the look and feel yourself to make it work for you.


    Billy
    Attached Files
    Mad 4 Ponies
    http://www.mad4ponies.com/index.html

    #2
    Just so it ties everything up here is the origianl thread we started: http://community.actinic.com/showthr...460#post234460.

    Billy did all the hard work as he suggests.

    I have created a version using unordered lists instead of tables which I will post here when I tidy it up a bit. As it is for my own purposes it is design for 1 attribute, in my case "Size" so would need more work if you needed it to work for mutliple attributes like size and colour.

    Happy developing,
    Bangers
    Boxhedge New Media Design
    Design and development solutions for SME's.
    Tel: 0118 966 2786
    Examples of work can be found at http://www.boxhedge.com

    Comment


      #3
      Excellent stuff, one for the AUG.

      Regards,
      Bruce King, Mole End Software Support
      Integrated label paper for Actinic A4 Paper with one or two peel off labels.
      One Stop Automation Automate Actinic. Mole End Automation works while you play.
      Mole End Product Mash for Actinic A suite of marketing feeds for your Actinic Store

      Actinic Upgrade and Design Service

      Comment


        #4
        Using <ul> Unordered List version.

        Site still in infancy but here is my use of the push grid using <ul><li> instead of tables. Don't use it unless you know how to design with css.
        (If anyone sees a problem with it by all means post it here.)

        http://www.picklesandpoppets.co.uk/G...red_Dress.html (I know product is out of stock here, for now anyway)

        http://www.pickleandpoppets.co.uk main site.

        Files attached but please note:
        I removed reference to the compontent name because I didn't need it, if you do replace:
        $listHeaderDesigns[$nAttributeListIdx][0] = "".
        with
        $listHeaderDesigns[$nAttributeListIdx][0] = "<actinic:variable name="AttributeName" />"

        I have it setup to work for one attribute only so further editting would be needed to work for multiple attributes.

        Use your own CSS to change the layout of all you create.

        Have fun
        Bangers
        Attached Files
        Boxhedge New Media Design
        Design and development solutions for SME's.
        Tel: 0118 966 2786
        Examples of work can be found at http://www.boxhedge.com

        Comment


          #5
          Nice work Billy/Bangers.

          Note to Billy, there's a chunk of actinic_main.php missing in your attachment above which causes an error in the order pane when the order is clicked.

          The first lines of the file should look like this:

          Code:
          <?php
          
          /***************************************************************
           *
           * actinic_main.php - Main inclusion file.
           *
           * This file is included all the time when a PHP expression
           * is evaluated on the desktop. All the code defined here will
           * be accessible by the PHP scripts inserted into the markup
           *
           **************************************************************
           * NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
           *
           * Be careful editing this file as any errors here may mess up
           * the rendering. Always check the sytax of this file by
           * executing it from the command line!
           *
           **************************************************************
           *
           * @package main
           * @author Zoltan Magyar
           * @copyright Actinic Software Ltd 2005
           *
           * $Revision: 9 $
           *
           ***************************************************************/
          
          chdir(dirname(__FILE__));
           
          define('EC_PATH_MODULES', dirname(__FILE__) . '/PHPModules/');
          define('EC_PATH_COMMON',			EC_PATH_MODULES . 'common/');
          define('EC_PATH_LANG', 				EC_PATH_MODULES);
          define('EC_PATH_PAYMENT', 			EC_PATH_MODULES . 'Payment/');
          define('EC_PATH_CARDEASEXML', 	EC_PATH_PAYMENT . 'CardEaseXML/');
          
          define('EC_LANG',	  'english');
          define('EC_PHPEXT',	  '.php');
          
          include EC_PATH_MODULES . 'base' . EC_PHPEXT;
          include EC_PATH_MODULES . 'taxmodule' . EC_PHPEXT;
          include EC_PATH_CARDEASEXML . 'Client' . EC_PHPEXT;
          include EC_PATH_PAYMENT . 'ActinicPayment' . EC_PHPEXT;
          
          /***************************************************************
           *
           * imagewidth - determinates the width of the passed in image
           *  The function is a wrapper for the gd library
           *
           * @param string $sFileName
           * @author Zoltan Magyar
           *
           ***************************************************************/

          Comment


            #6
            Nice one. Thanks Bentleybloke.

            Billy
            Mad 4 Ponies
            http://www.mad4ponies.com/index.html

            Comment


              #7
              Billy(Bangers)

              This neat solution is something I am very keen to implement. However, before I start diving into it, I just wanted to make sure it will work OK with Actinic Business V9.0.3. There is nothing in the two files that would cause concern as long as I follow the instructions. Your confirmation would very much be apreciated.

              Regards
              Nilesh

              Comment


                #8
                If you're on 9.0.3 you won't need the fix mentioned on http://community.actinic.com/showthread.php?t=35114 as Actinic have now implemented it.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  you should be fine (to be honest it's been a while since I've looked at it).
                  best of luck.
                  regards
                  bangers
                  Boxhedge New Media Design
                  Design and development solutions for SME's.
                  Tel: 0118 966 2786
                  Examples of work can be found at http://www.boxhedge.com

                  Comment


                    #10
                    Thank you guys - Will give it a shot soon taking into account the fix already there in V9.

                    Regards
                    Nilesh

                    Comment


                      #11
                      Originally posted by nileshpa View Post
                      Thank you guys - Will give it a shot soon taking into account the fix already there in V9.

                      Regards
                      Nilesh
                      V10 provides Real Time Stock Control which uses java script to hide parts of the html as required, this can be modified to hide the permutation buttons or even to disable the individual buttons if you have associated products under stock control.

                      Malcolm

                      SellerDeck Accredited Partner,
                      SellerDeck 2016 Extensions, and
                      Custom Packages

                      Comment


                        #12
                        Thanks for the update, Malcolm.

                        I've upgraded to V10 and have also managed to implement Billy's solution.
                        Have had parsing errors which I have tried to circumvent. See http://community.actinic.com/showthread.php?t=49614

                        Understand, RTSC was introduced in V10 but it simply hid the product via HTML if the it , in my case, a particular shoe Size, was sold out. What I wanted to show on the website was that the particular shoe size /product may be out of stock at the moment but we do stock that size.

                        regards,
                        Nilesh

                        Comment


                          #13
                          Originally posted by nileshpa View Post
                          Thanks for the update, Malcolm.

                          I've upgraded to V10 and have also managed to implement Billy's solution.
                          Have had parsing errors which I have tried to circumvent. See http://community.actinic.com/showthread.php?t=49614

                          Understand, RTSC was introduced in V10 but it simply hid the product via HTML if the it , in my case, a particular shoe Size, was sold out. What I wanted to show on the website was that the particular shoe size /product may be out of stock at the moment but we do stock that size.

                          regards,
                          Nilesh
                          I implemented modifications to the stock system so that it provides an individual message against each option indicating the stock status. This is live so changes automatically as stock levels change on site.

                          Malcolm

                          SellerDeck Accredited Partner,
                          SellerDeck 2016 Extensions, and
                          Custom Packages

                          Comment


                            #14
                            Thanks Malcolm.

                            Would be interested on how its been done. Could you please put the url up so I can see what it looks like?. Many Thanks , Nilesh

                            Comment


                              #15
                              Originally posted by nileshpa View Post
                              Thanks Malcolm.

                              Would be interested on how its been done. Could you please put the url up so I can see what it looks like?. Many Thanks , Nilesh
                              This is a demo of the stock plug in, this page uses images and text strings, and controls the 'buy now' button off the component stock.http://stockplugin.toddesigns.co.uk/...s_Buy_Now.html

                              Other pages on the site show actual stock or just text strings.

                              Malcolm

                              SellerDeck Accredited Partner,
                              SellerDeck 2016 Extensions, and
                              Custom Packages

                              Comment

                              Working...
                              X