Announcement

Collapse
No announcement yet.

Quick question on .Cat Files...

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

    Quick question on .Cat Files...

    Just a quick one...

    On clicking the Add to Cart button I notice that the perl scripts look up a cat file to check that the product / section exists, and then takes product details from that file... Am I correct?

    If a Cat file for a specific SID does not exist then the system errors...

    Can someone explain the following please...

    1, what is the first INT number that appears on the first line of the file, and what is its relevance?

    2, I would lke to understand the full process of adding a product to the shopping cart step by step / line by line...?

    If anyone has the time this would be greatly appreciated...

    I have included the text from an existing product section cat file below...

    -------------------------------------------------------------------
    375559;
    $::g_pSectionList{'A000252.cat'} =
    {
    'VERSION' => 12,
    'CART_MODE' => 3,
    '1808' => { 'REFERENCE' => '1808', 'NAME' => 'Bobsleigh Tickets - 18/02/2006 - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 1, 'TAX_3' => '1=0=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', 'COMPONENTS' => [['Ticket Type',[['-', 1, ['Category 1 Ticket','Category 2 Ticket',]],['', 2, [0]],],1,[[[1], '', {
    1 => [
    [0,5500],
    ],
    }, 2, 0, 0],[[2], '', {
    1 => [
    [0,3500],
    ],
    }, 2, 0, 0],[[-1], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],[[], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],],0,{ }, 0, 0, 0, 0, 0], ], },
    '1826' => { 'REFERENCE' => '1826', 'NAME' => 'Bobsleigh Tickets - 19/02/2006 - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 1, 'TAX_3' => '1=0=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', 'COMPONENTS' => [['Ticket Type',[['-', 1, ['Category 1 Ticket','Category 2 Ticket',]],['', 2, [0]],],1,[[[1], '', {
    1 => [
    [0,7000],
    ],
    }, 2, 0, 0],[[2], '', {
    1 => [
    [0,5000],
    ],
    }, 2, 0, 0],[[-1], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],[[], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],],0,{ }, 0, 0, 0, 0, 0], ], },
    '1841' => { 'REFERENCE' => '1841', 'NAME' => 'Bobsleigh Tickets - 20/02/2006 - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 1, 'TAX_3' => '1=0=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', 'COMPONENTS' => [['Ticket Type',[['-', 1, ['Category 1 Ticket','Category 2 Ticket',]],['', 2, [0]],],1,[[[1], '', {
    1 => [
    [0,5500],
    ],
    }, 2, 0, 0],[[2], '', {
    1 => [
    [0,3500],
    ],
    }, 2, 0, 0],[[-1], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],[[], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],],0,{ }, 0, 0, 0, 0, 0], ], },
    '1853' => { 'REFERENCE' => '1853', 'NAME' => 'Bobsleigh Tickets - 21/02/2006 - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 1, 'TAX_3' => '1=0=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', 'COMPONENTS' => [['Ticket Type',[['-', 1, ['Category 1 Ticket','Category 2 Ticket',]],['', 2, [0]],],1,[[[1], '', {
    1 => [
    [0,7000],
    ],
    }, 2, 0, 0],[[2], '', {
    1 => [
    [0,5000],
    ],
    }, 2, 0, 0],[[-1], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],[[], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],],0,{ }, 0, 0, 0, 0, 0], ], },
    '1890' => { 'REFERENCE' => '1890', 'NAME' => 'Bobsleigh Tickets - 24/02/2006 - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 1, 'TAX_3' => '1=0=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', 'COMPONENTS' => [['Ticket Type',[['-', 1, ['Category 1 Ticket','Category 2 Ticket',]],['', 2, [0]],],1,[[[1], '', {
    1 => [
    [0,5500],
    ],
    }, 2, 0, 0],[[2], '', {
    1 => [
    [0,3500],
    ],
    }, 2, 0, 0],[[-1], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],[[], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],],0,{ }, 0, 0, 0, 0, 0], ], },
    '1901' => { 'REFERENCE' => '1901', 'NAME' => 'Bobsleigh Tickets - 25/02/2006 - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 1, 'TAX_3' => '1=0=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', 'COMPONENTS' => [['Ticket Type',[['-', 1, ['Category 1 Ticket','Category 2 Ticket',]],['', 2, [0]],],1,[[[1], '', {
    1 => [
    [0,7000],
    ],
    }, 2, 0, 0],[[2], '', {
    1 => [
    [0,5000],
    ],
    }, 2, 0, 0],[[-1], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],[[], '', {
    1 => [
    [0,0],
    ],
    }, 0, 0, 0],],0,{ }, 0, 0, 0, 0, 0], ], },
    '1807' => { 'REFERENCE' => '1807', 'NAME' => 'Bobsleigh Tickets - The Winter Olympics 2006', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 0, 'TAX_3' => '301=1750=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'NO_ORDER' => 1, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', },
    '1924' => { 'REFERENCE' => '1924', 'NAME' => ' ', 'PRICE' => 0, 'MIN_QUANTITY_ORDERABLE' => 1, 'MAX_QUANTITY_ORDERABLE' => 0, 'OUT_OF_STOCK' => 0, 'DATE_PROMPT' => '', 'OTHER_INFO_PROMPT' => '', 'PRICING_MODEL' => 0, 'TAX_3' => '301=1750=0=', 'OPAQUE_SHIPPING_DATA' => '', 'SHIP_SEPARATELY' => 0, 'NO_ORDER' => 1, 'REPORT_DESC' => '', 'PRICES' => {
    1 => [
    [0,0],
    ],
    },
    'CUSTOMVARS' =>
    {
    },
    'NO_ORDERLINE' => 0, 'AUTOSHIP' => 0, 'PRODUCT_GROUP' => -1, 'THUMBNAIL' => '', },
    'PARENT_SECTIONS' => [115,6],
    'CUSTOMVARS' =>
    {
    },
    };

    return($::SUCCESS);
    -----------------------------------------------------------------
    Please help my boss is about to sack me...
    Dean

    #2
    Just a quick one
    A quick question; but unfortunately there's no quick answer as to how approximately 85,000 lines of Perl work.

    1) The number is a checksum, used to stop corrupt (or hacked) Section blobs being loaded. Section files are loaded in Actinic.pm via sub ReadConfigurationFile and you'll see that it calls sub ReadAndVerifyFile which does the checksum verify.

    2) As to how the Add to cart process operates look in ShoppingCart.pl sub ProcessAddToCartCall and follow the code from there.

    Please help my boss is about to sack me
    Just ask said boss to help you look through the 85,000 lines of Perl. That should give a more realistic outlook on the complexity of what you seem to be wanting to do.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      OK next (quick question)...

      How can I modify the perl to bypass such routines to allow for product info that was NOT generated by Actinic but via customer extranet interface / stored i a MySQL table...

      The site I am working on is http://www.capital-tickets.com/acatalog

      The test site is currently up at http://www.testation.co.uk/acatalog

      This is in its early stages but I will not be beat... and any help that I receive in achieving this will be appreciated, and I will return the favour by documenting my test case...

      Comment


        #4
        The best way would be not to use Actinic at all. There are other solutions out there that use PHP / MySQL as the basis for the entire system. We tend not to talk about other products on these forums so you should look elsewhere for help on alternatives.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X