Results 1 to 7 of 7
  1. #1

    Default How might I separate my attributes from prod quantity?

    Hi there,

    For many of our products, we're using attributes as a way to allow customers to add-on to their purchase at the last moment. An example is bike chain (http://t-cycle.com/-p-35.html), which we sell by the foot: I'd like to give the customer the option to buy, at the same time, a number of connecting links, but don't want them to end up with 16x as many links as they'd chosen via the attribute.

    I haven't been able to find a way to present the option for a customer to buy a set number of an attribute without that number being multiplied by the product quantity. Is there a fairly unobtrusive way to do this? If not, what's the obtrusive way of doing it?

    In the link posted, the attribute has been disabled due to the problem herein discussed.


    Thanks,

    Casimir

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,925
    Plugin Contributions
    96

    Default Re: How might I separate my attributes from prod quantity?

    Mark the attribute as being a one-time charge, instead of an attribute price. Then, its cost will not be multiplied by the product quantity.

  3. #3

    Default Re: How might I separate my attributes from prod quantity?

    Thank you, thank you.

    I both hoped and feared it'd be that simple.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,925
    Plugin Contributions
    96

    Default Re: How might I separate my attributes from prod quantity?

    You're very welcome. The one-time charge feature of the Zen Cart attributes is one that's easily overlooked!

  5. #5

    Default Re: How might I separate my attributes from prod quantity?

    I appreciate the help, and have further question in the One Time Charge realm:

    When I add an Attribute Price, it puts the additional price in parentheses, but when I add a One Time Charge, it just adds a space (e.g. http://t-cycle.com/-p-136.html, where the Radio attribute is an Attribute Price and has parentheses, but the second Dropdown attribute is a One Time Charge and the price is just beside the Option Value) which is wholly unappealing and slightly confusing; do you know wherein the PHP I should be looking to change that?

    Thanks again!

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,925
    Plugin Contributions
    96

    Default Re: How might I separate my attributes from prod quantity?

    The attributes-formatting is provided by /includes/modules/attributes.php (which you can copy to /includes/modules/YOUR_TEMPLATE/attributes.php and make your template-override edits there) and /includes/templates/YOUR_TEMPLATE/TEMPLATES/tpl_modules_attributes.php.

  7. #7

    Default Re: How might I separate my attributes from prod quantity?

    Thanks again, lat9!

    For anyone else who's looking to add parentheses to the prices of their One Time Attribute Prices, you can use the ATTRIBUTES_PRICE_DELIMITER_PREFIX and SUFFIX to do it. I changed my /includes/modules/attributes.php from this:

    PHP Code:
                        if ($products_options->fields['attributes_price_onetime'] != or $products_options->fields['attributes_price_factor_onetime'] != 0) {
                          
    $show_onetime_charges_description 'true';
                          
    $new_onetime_charges zen_get_attributes_price_final_onetime($products_options->fields["products_attributes_id"], 1'');
                          
    $price_onetime TEXT_ONETIME_CHARGE_SYMBOL $currencies->display_price($new_onetime_chargeszen_get_tax_rate($product_info->fields['products_tax_class_id']));
                        } else {
                          
    $price_onetime '';
                        } 
    to this:

    PHP Code:
                        if ($products_options->fields['attributes_price_onetime'] != or $products_options->fields['attributes_price_factor_onetime'] != 0) {
                          
    $show_onetime_charges_description 'true';
                          
    $new_onetime_charges zen_get_attributes_price_final_onetime($products_options->fields["products_attributes_id"], 1'');
                          
    $price_onetime ATTRIBUTES_PRICE_DELIMITER_PREFIX $currencies->display_price($new_onetime_chargeszen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
                        } else {
                          
    $price_onetime '';
                        } 
    A note: I did away with the notifications of "* One time charges may apply," and therefore wasn't afraid to get rid of the "TEXT_ONETIME_CHARGE_SYMBOL" in the above code.

 

 

Similar Threads

  1. v150 How can i attatch a different item number to separate attributes?
    By robbrown in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 14 Apr 2012, 02:51 PM
  2. How to show attributes price as a separate item
    By Zaki in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 6 Nov 2008, 10:25 PM
  3. Separate quantity boxes for different attributes
    By ::AnanA:: in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 7 Oct 2008, 02:21 PM
  4. Attributes: Separate Price From Option Value
    By vivaknievel in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Aug 2008, 05:03 PM
  5. How to build products quantity from attributes?
    By Intersfer in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 11 Sep 2006, 10:34 PM

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