Announcement

Collapse
No announcement yet.

Is Ref2File still required for V11?

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

    Is Ref2File still required for V11?

    I'm upgrading from V9 to V11 and wonder whether this needs to be done, too?
    The Patchwork Rabbit

    #2
    Originally posted by PatchworkRabbit View Post
    I'm upgrading from V9 to V11 and wonder whether this needs to be done, too?
    ref2file is a PHP routine written by Gabriel Crowe. If you are using it in your code (could be the navigation code published in the forum by Gabe) and changing version then the code will need updating to match the version of Actinic you are using.

    Ref2File includes a call to the function GetSectFileName() which calls the Actinic Database.

    e.g for Actinic V9
    Code:
    $connect = odbc_connect("ActinicCatalog9","","");
    you need to change all references to ActinicCatalog9 (8,9,or10) to be ActinicCatalog11

    if you search the forum for ref2file there are a number of posts on the subject

    Malcolm

    SellerDeck Accredited Partner,
    SellerDeck 2016 Extensions, and
    Custom Packages

    Comment


      #3
      Originally posted by malbro View Post
      ref2file is a PHP routine written by Gabriel Crowe. If you are using it in your code (could be the navigation code published in the forum by Gabe) and changing version then the code will need updating to match the version of Actinic you are using.

      Ref2File includes a call to the function GetSectFileName() which calls the Actinic Database.

      e.g for Actinic V9
      Code:
      $connect = odbc_connect("ActinicCatalog9","","");
      you need to change all references to ActinicCatalog9 (8,9,or10) to be ActinicCatalog11

      if you search the forum for ref2file there are a number of posts on the subject
      Hi Malcolm, im trying to get add to cart from related product, im using the code, this works fine for linking directly to the product, but if i try to use the ful best sellers layout, (stripped down to include the below, with an add to car button it dont work...

      HTML Code:
       <a href="<actinic:variable name="CatalogURL" /><actinic:block php="true">echo Ref2file("<actinic:variable Name="ProductReference" />");</actinic:block>" "rel="nofollow" ><img style="border: 0;" src="<actinic:variable name="ProductThumbnailImageFileName" />" width="125" height="125" alt="<actinic:variable name="ProductName" encoding="strip"/>" />
      		</a><br> <a href="<actinic:variable name="CatalogURL" /><actinic:block php="true">echo Ref2file("<actinic:variable Name="ProductReference" />");</actinic:block>"><actinic:variable name="Product Name" /></a><br>VOLUME<br><div class="youSave">Our Price:          <actinic:block if="%3cactinic%3avariable%20name%3d%22PriceIsEnabled%22%20%2f%3e">
      				<Actinic:PRICES PROD_REF="<actinic:variable Name="ProductID" />">
                  <actinic:variable name="PriceListRetail" />
                  </Actinic:PRICES>
               </actinic:block>
        </div>
      Also Tried This

      HTML Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">
            <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />"> 
               <input type="hidden" name="SID" value="<Actinic:Variable Name="SectionID"/>" />
               <input type="hidden" name="PAGE" value="PRODUCT" />           
               <input type="hidden" name="PAGEFILENAME" value="<actinic:variable name="SectionPageName" />" />
               <Actinic:SECTION BLOB='<Actinic:Variable Name="SectionCatFile"/>'/>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
                  <!-- Hidden field when in trial mode -->
                  <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
               </actinic:block>
      </actinic:block>
      
      	<div class="product_list">
      		<div class="image_product"><actinic:variable name="ProductImageLayout" /></div>
      			<div>
               <div style="float: right;">
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsAddToCartButtonShown%22%20%2f%3e%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22NumberAttributesInPushButtonGrid%22%20%2f%3e%20%3d%3d%200%29" >
                  <actinic:variable name="AddToCartButton" />
               </actinic:block>
      			</div>
      
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsOutOfStockShown%22%20%2f%3e">
                  <input type="button" value="<actinic:variable name="OutOfStock" />" disabled="disabled" class="form_button_add_to_cart" />
               </actinic:block>
      
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsCatalogSuspendedShown%22%20%2f%3e">
                  <input type="button" value="<actinic:variable name="CatalogSuspended" />" disabled="disabled" class="form_button_add_to_cart" />
               </actinic:block>
               
               <actinic:variable name="ListIndex" />. <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:variable Name="ProductID" />&amp;NOLOGIN=1"><b><Actinic:Variable Name="ProductName"/></b></a>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductReferenceVisible%22%20%2f%3e" >
                  <p>Ref: <actinic:variable name="ProductReference" /></p>
               </actinic:block>
      			<h3 class="product_price">
               <actinic:block if="%3cactinic%3avariable%20name%3d%22PriceIsEnabled%22%20%2f%3e">
      				<Actinic:PRICES PROD_REF="<actinic:variable Name="ProductID" />" RETAIL_PRICE_PROMPT="<Actinic:Variable Name="ProductPriceDescription"/>">
                  <actinic:variable name="PriceListRetail" />
                  </Actinic:PRICES>
               </actinic:block>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceIsEnabled%22%20%2f%3e%20%3d%3d%20False">
      	         <Actinic:NOTINB2B><br /><actinic:variable name="ProductPriceNotEnabledMessage" /></Actinic:NOTINB2B>
               </actinic:block>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsCustomerMessageUsed%22%20%2f%3e">
                  <br />
                  <Actinic:PRICE_EXPLANATION PROD_REF="<actinic:variable Name="ProductID" />" COMPONENTID=-1><Actinic:Variable Name="RetailCustomerMessage"/></Actinic:PRICE_EXPLANATION>
               </actinic:block>
               </h3>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsQuantityPromptShown%22%20%2f%3e">
                  <p>
                  <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span><input type="text" name="Q_<Actinic:Variable Name="ProductID"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" class="form_input_general" />
                  </p>
               </actinic:block>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsQuantityPromptHidden%22%20%2f%3e">
                  <input type="hidden" name="Q_<actinic:variable Name="ProductID"/>"  value="<actinic:variable name="DefaultQuantity"/>" />
               </actinic:block>
               <actinic:variable name="AttributeList" />
               <actinic:variable name="ComponentList" />
            </div>  
      			<p>
               <actinic:variable name="CartError" />         
      		
               <actinic:block if="%3cactinic%3avariable%20name%3d%22FileURLNotEmpty%22%20%2f%3e">
                  <br />
                  <a href="<Actinic:Variable Name="ProductLinkInfo"/>">
                     <Actinic:Variable Name="ProductLinkText"/>
                  </a>
               </actinic:block>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22DiscountDescriptionIsShownForProducts%22%20%2f%3e">      
                  <br /><actinic:variable name="DiscountList" value="Standard Discount List" />
               </actinic:block>
               
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsOtherInfoPromptShown%22%20%2f%3e">
                  <br />
                  <span class="actrequired"><Actinic:Variable Name="OtherInfoPrompt"/></span><br />
                  <input type="text" name="O_<Actinic:Variable Name="ProductID"/>" size="40" maxlength="1000" value="" />
               </actinic:block>
               
               <actinic:block if="%3cactinic%3avariable%20name%3d%22IsDatePromptShown%22%20%2f%3e">
                  <br />
                  <span class="actrequired"><actinic:variable name="DatePrompt"/></span><br />
                  <actinic:variable name="DayList" /><actinic:variable name="MonthList" /><actinic:variable name="YearList" />
               </actinic:block>
               
               <actinic:variable name="ProductAlsoBoughtList" />
               
            
               </p>
      	</div>
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">
            </form>
      </actinic:block>

      and i get this

      HTML Code:
      A General Script Error Occurred
      Error: The specified product (reference 65) has just been removed from the catalog. Please return to the catalog and continue shopping. If you press the Refresh or Reload button on your browser, the removed products will no longer be visible in the catalog. We apologize for the inconvenience.Press the Browser back button and try again or contact the site owner

      I tried to put this in the full best seller list layout, however it dosent work, every time i try to add to cart, it states that the product has been removed, I have remove the add to cart button at the moment, any ideas?

      I did try and use the full best sellers layout to no avail?

      Cheers Lee
      http://www.novadetox.co.uk

      Comment


        #4
        You are possibly nesting HTML FORMS which isn't allowed.

        It can be done. I have a Related Products Upsell add-on and it overcomes this nesting by opening the full details of the product in a lightbox. Demo on http://www.drillpine.biz/v9greyboxsi...log/Books.html
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Cheers for that Mal!

          Globalee, I've added buttons to my Related Product list, but I'm not sure what layout I'm using. I'll check it out and get back to you.

          See here for an example page:

          http://www.patchwork-rabbit.co.uk/ac...club-2012.html
          The Patchwork Rabbit

          Comment

          Working...
          X