Announcement

Collapse
No announcement yet.

Link to product price?

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

    Link to product price?

    Is there anyway, given a product number, that you can somehow display the products price on a page that isn't a product page?

    For example, let's say I put some hardcoded links on my homepage to some 'special offer' products. I also want to display the price on the homepage, next to the description or what ever.

    The only way to do this at the moment is to hardcode the price. But that isn't really an option because the way the prices keep changing and the number of products this would quickly become a reall pain.

    So is there some variable, or some javascript that can get the correct value as actinic is generating the static pages?

    As far as I can tell the productprice variable only works on the product page (presumably as otherwise it wouldn't know which products price to display).
    John

    #2
    My guess: The product price is held in the .cat files (indexed by product id). The only way to get at it is with a php or perl script. The script could generate a small amount of HTML which could be included in the target page.

    Comment


      #3
      If these pages are generated by Actinic then you could possible customise some of Actinic's own ProductList layouts and code some conditions to only show the info (price etc) that you want for certain products.

      e.g.

      Code:
      <actinic:block type="EntireSectionList" >
          <actinic:block type="ProductList" >
              <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductReference%22%20%2f%3e%20%3d%3d%20%221%22" >
                  <actinic:block type="PriceList" >
                      <actinic:variable name="PriceLayout" />
                  </actinic:block>
              </actinic:block>
      </actinic:block>
      </actinic:block>
      The above code, if dropped into a brochure page, will display the price layout for a product with reference "1"

      You could amend the condition for anything e.g. a list of product references or descriptions.

      Note: Performance hit is HUGE on large sites where the above "entire section list" is on many pages. I'd recommend only using it on a few pages.
      Fergus Weir - teclan ltd
      Ecommerce Digital Marketing

      SellerDeck Responsive Web Design

      SellerDeck Hosting
      SellerDeck Digital Marketing

      Comment


        #4
        Cardinal sin #2 repeated?

        Comment


          #5
          Originally posted by leehack View Post
          Cardinal sin #2 repeated?
          Flogging myself now as I type!

          Still, might be a good reason to upgrade!
          Fergus Weir - teclan ltd
          Ecommerce Digital Marketing

          SellerDeck Responsive Web Design

          SellerDeck Hosting
          SellerDeck Digital Marketing

          Comment


            #6
            Originally posted by leehack View Post
            Cardinal sin #2 repeated?
            Is this a reference to the fact that Fergus has posted a V8 answer in the V7 forum?

            Comment


              #7
              Originally posted by acompton View Post
              Is this a reference to the fact that Fergus has posted a V8 answer in the V7 forum?
              Lee is the Thread Police

              v7 and before did not allow this sort of easy availability of code at different parts of the store. I don't recall this being done pre v8. v7 does not have a PHP engine built in so extracting the prices could prove tricky and is almost certainly more efficient (in terms of time and database stability) to upgrade to v9 (plus you get all the additional benefits such as upselling)


              Bikster
              SellerDeck Designs and Responsive Themes

              Comment


                #8
                The problem is I have several v7 sites, inc 2 large, & 1 v.large and all of them would have to be upgraded together (because of the licence, and using mole 1stop auto). But they are all quite heavilty customised so what are the chances that upgrading them is going to work without shedloads of technical problems?
                John

                Comment


                  #9
                  Originally posted by jxm28788 View Post
                  ...so what are the chances that upgrading them is going to work without shedloads of technical problems?
                  Upgrading a modified site from v7 is not the way to go. You'd need to redesign the site.

                  You can rip the online html and create a copy for the outer layout but that's all. You could also recover the product data, but it rarely goes easily.

                  Comment


                    #10
                    ...and that's why I'm still on V7...

                    Is there any practical way to run both v7 and v9 at the same time? I'm adding new sites all the time so creating them in v9 would be easy enough. But I'd need to be able to run the v7 and v9 software on the same machine, so will V7/V9 work without conflicting? And what would happen about the licencing? Do I need two full versions? or is there an uprade licence?
                    John

                    Comment


                      #11
                      v7 and v9 can be installed together on the same pc without any problems.
                      Strictly speaking when you upgrade to v9 your old licence becomes void - but of course it takes time to upgrade - just how long well...

                      Comment


                        #12
                        John,

                        Have a look at this page: http://www.greenknightgames.co.uk/ac...All_Games.html
                        It uses a small php script to retrive data from a file on the website. The script call is embedded in an Ajax call so the output is included in final page. This is the kind of technique I was suggesting.

                        Comment


                          #13
                          ok, that might be the best way forward.

                          How do you know which CAT file to look in though...? I opened one at random (A00011.cat) and the filename had no relationship to the product ID (in this case 85).
                          John

                          Comment


                            #14
                            The cat files are actually fragments of perl script that contain array definitions. To understand how they work, you need to start reading the Actinic .pl scripts.

                            An easier route might be to follow what I did and produce a simple tab-separated text file that contains the necessary product information. If you ordered it by product id, you can look up the product name and link url. I generate this file from the Froogle feed output.

                            Comment

                            Working...
                            X