Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2008
    Posts
    21
    Plugin Contributions
    0

    Have a Drink Shopping Cart Customization

    I need a detailed explanation of how the shopping cart moves through the attributes and individually associates them to each product.

    I'm trying to associate a custom attribute to each product. Im able to get the custom attributes id into the customer_basket_attributes db, but the code to get the info for each id and place it individually with each product has eluded me.

    The current code I have wants to pull only the first record in the db and then populate each product after with that same first result.

    I apologize if this seems vague, its been a while for me to use php and I'm a bit rusty.

    Thanks in advance!

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Shopping Cart Customization

    I think that the orders_products_attributes table might form part of an answer to your question. But it is rather difficult to follow precisely what you're asking.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

    Default Re: Shopping Cart Customization

    Can you explain exactly what it is you're trying to do, maybe there is a different solution.

  4. #4
    Join Date
    Nov 2008
    Posts
    21
    Plugin Contributions
    0

    Default Re: Shopping Cart Customization

    Sorry for the lack of detail.

    I'm trying to reproduce what is happening in the shopping cart with attributes with an extra attribute.

    So......I'm adding an extra attribute as an ID number to the table customers_basket attributes. Then, pulling information from another table for that ID, which will be unique to each item in the cart.

    So I guess taking the same process that's happening in the class shopping_cart.php and tpl_shopping_cart_default.php and associate an extra attribute with each item in the shopping cart.

  5. #5
    Join Date
    Nov 2008
    Posts
    21
    Plugin Contributions
    0

    Default Re: Shopping Cart Customization

    Alright. how about...can anyone explain to me how this piece of code is working:

    PHP Code:
      $attributes $db->Execute("select products_options_id, products_options_value_id, products_options_value_text, applicants_id
                                 from " 
    TABLE_CUSTOMERS_BASKET_ATTRIBUTES "
                                 where customers_id = '" 
    . (int)$_SESSION['customer_id'] . "'
                                 and products_id = '" 
    zen_db_input($products->fields['products_id']) . "' " $order_by);

            while (!
    $attributes->EOF) {
              
    $this->contents[$products->fields['products_id']]['attributes'][$attributes->fields['products_options_id']] = $attributes->fields['products_options_value_id'];
              
    //CLR 020606 if text attribute, then set additional information
              
    if ($attributes->fields['products_options_value_id'] == PRODUCTS_OPTIONS_VALUES_TEXT_ID) {
                
    $this->contents[$products->fields['products_id']]['attributes_values'][$attributes->fields['products_options_id']] = $attributes->fields['products_options_value_text'];

              }
              
    $attributes->MoveNext(); 
    Specifically the while statement.

    Thanks
    Last edited by conboy; 10 Nov 2008 at 04:00 PM. Reason: m

 

 

Similar Threads

  1. v139h Shopping Cart Customization Question
    By voltar in forum General Questions
    Replies: 0
    Last Post: 7 Jun 2012, 09:53 PM
  2. Shopping cart totals in header customization
    By rrzc in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 8 Jun 2010, 07:29 PM
  3. Major customization of shopping cart page
    By v.kirk in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Apr 2007, 02:31 AM
  4. Customization of Shopping Cart Contains
    By matthelm in forum Customization from the Admin
    Replies: 0
    Last Post: 30 Dec 2006, 02:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg