Announcement

Collapse
No announcement yet.

Product property dynamically populating parent description property?

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

    Product property dynamically populating parent description property?

    Hi

    At present I have each of products set within a section (usually a 1 to 1 relationship) and I have the product price written in the section description.

    See example: http://www.kjbeckett.com/acatalog/silkties.html.

    I was wondering if it is possible to have the SECTION's description dynamically populated by a property from the product contained within . E.g. the price of the product populates the parent section's description?

    Regards

    Paul
    KJ Beckett
    Men's Clothing & Accessories
    Cufflinks, Underwear, Ties, Grooming Products
    Bath, England
    Fast delivery to UK, USA and worldwide.
    Men's Fashion Blog

    #2
    Afraid not. The Sections aren't aware that there's only 1 product within them and have no access to that products details.

    Here's a way to go about it if you know Access. I'm assuming you have only 1 per section.

    Create a Custom Property ITEMPRICE. For every Section in each Sections Properties tab set it to a dummy value (a space would do).

    Add CUSTOMVAR:ITEMPRICE to your Act_SectionLinexxx.html template.

    Create an Update Query in Aceess as below:-

    1) Look up table HTMLVariables to find the nVariableID for that particular Property.

    2) Scan through your Products table, extract the Price and the nParentSectionID.
    You now have a Price and a parent section ID to stick it in.

    3) Look in ProductProperties table for an nType of 3, an nValue that matches the nVariableID you got in (1) and a nSectionID that matches the parent section ID you collected in (2). Stick the Price from (2) into the sString1 field (you will have to reformat it and divide by 100 as it's in pennies).

    4) Repeat from (2) until all products done.

    Whenever you change prices, re-run this Update Query.

    I'm not an Access user so you'll have to do this yourself or find someone who knows how.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman.

      Im not an Access user either but will liaise with my friend who is.

      Its interesting that you replied to this because I have a second part to my question - which relates to one of your patches. In a sepertate posting today I will raise a question about the possible use of your NorPrice - Automatic multi currency display on entire catalog (look out for that ;-).

      Could your suggestion below/above be have the NorPrice listing included also?

      Paul
      KJ Beckett
      Men's Clothing & Accessories
      Cufflinks, Underwear, Ties, Grooming Products
      Bath, England
      Fast delivery to UK, USA and worldwide.
      Men's Fashion Blog

      Comment

      Working...
      X