Announcement

Collapse
No announcement yet.

custom fields in act_productprice

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

    custom fields in act_productprice

    I have added some custom fields to my products and have updated act_productprice to display these. This works absolutely fine. However, when I add a product to cart I get the standard cart page that includes my price but does not display the values from these custom fields. I have some hardcoded text labels in act_productprice and they appear OK, can anyone help ?

    #2
    The Cart pages are generated by Perl sctipts. These scripts only know about the standard Actinic variables (product Name, Reference, Price, etc). It won't be possible to diplay Custom Properties without some Perl hacking.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Bit of a shortcoming there then...

      How much hacking will it take, given that it is obviously using the productprice template. Is there anyway I can globalise the variables ? Perhaps I just need to include them explicitly in the perl and they will picked up and formatted as per productprice. I am willing to take the risk, looks very unprofessional otherwise. Would also like to add the product image to this page also....don't want much do I !!

      Comment


        #4
        Here's a very quick (and untested) way to display a product level custom property (called MYVAR) in the Cart. Edit ActinicOrder.pm (in Site1).
        Look for the pair of lines
        Code:
        			$sInfoLine = InfoLineHTML($$pProduct{'OTHER_INFO_PROMPT'}, $sInfo, $sInfoLineHTML);
        			}
        After these lines add
        Code:
        			if ( $$pProduct{CUSTOMVARS}{MYVAR} ne '' )
         				{
        				$sInfoLine = "<br>" . $$pProduct{CUSTOMVARS}{MYVAR};
        				}
        Note that we're doing no formatting of that property, or passing it as a variable that can be moved around in the Cart templates - we're just appending it to an existing field.
        Last edited by NormanRouxel; 20-Jan-2006, 01:20 PM. Reason: Amended patch to use <br> for new line
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Product images can be displayed in the Cart as standard. You may need to add some variables to the Cart template. See the Advanced Guide and Knowledge Base for help there.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Many thanks for your input. I am only really interested in the page that is displayed when you add a product to the cart, browser shows ca000001.pl. At this point the customer needs to confirm the cart addition and it is here that I would like a picture of the product. Also, it is here that my custome fields don't display.It is obviously using productprice as a template because I have added some text which is displayed, but the variables referenced in productprice are not.

            I think by the time a user has items in the cart, they can always jump around to check that the description matches the product they want, but when it is being added it wiuld be really useful to have the product image displayed.

            Comment


              #7
              That's the Quantity on Confirmation Page. This is an old way of adding to the Cart, isn't very flexible for patching, and my patch above doesn't apply.

              You'll either have to fix ShoppingCart.pl (this generated ca00005n.pl) or use a different Shopping Mode (like Quanitity on Product Page).
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment

              Working...
              X