Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Percentage Pricing on Attributes

    Hi I have a site that has a variety of attribute options to choose from.

    The Products have 5 options to choose from in the first set of attributes which are set at standard prices as follows:

    Product 1

    Attribute Set 1 - option1=£300.00, option2=£350.00, option3=£400.00

    Then a set of attributes underneath these that apply 20% of the price on top using Price Factor: 1.2 Offset: 1.0

    I need the 20% to be added to whichever option is selected in Attribute Set 1 - so 300.00 + 20%, 350.00 + 20%, 400.00 + 20% when they select any of the attributes beneath Attribute set 1.

    Currently the Price Factor : Offset is applying 20% to the lowest price (base price) only when I need it to add 20% to whatever option is selected in Attribute Set 1.

    Can anybody shed any light on how I would allow attributes to apply a percentage of the price to any of the options selected in Attribute set 1 instead of only applying it to the base price?

    So if option 2 = £350.00 was selected it would still apply 20% on top of £350.00 (£70.00), instead of adding 20% of option 1 = £300.00 (£60.00) on to £350.00.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Percentage Pricing on Attributes

    What you are describing is "Dependent attributes" and ZenCart does not have any support for them
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Percentage Pricing on Attributes

    Kobra I actually have something working after finding this thread http://www.zen-cart.com/showthread.p...92#post1159692

    Which states to change this

    Code:
    $added_charge = zen_get_attributes_price_factor($chk_price, $chk_special, $attribute_price->fields['attributes_price_factor'], $attribute_price->fields['attributes_price_factor_offset']);
    to this

    Code:
    $added_charge = zen_get_attributes_price_factor($attributes_price, $chk_special, $attribute_price->fields['attributes_price_factor'], $attribute_price->fields['attributes_price_factor_offset']);
    And it works to a degree. The calculations are done correctly all the way through the cart process exactly how I want them, apart from I cannot find how to update the sub total in the shopping cart, that still displays the sub total as Base Price + Attribute Price (not percentage of attribute price).

    Which file controls what is displayed in the sub total inside tpl_shopping_cart_default.php? If I can get the sub total to add together prices that are calculated with the changed line of code above then it will work exact to how I want it.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  4. #4
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Percentage Pricing on Attributes

    Just thought I'd edit this, $added_charge = zen_get_attributes_price_factor($chk_price, $chk_special, $attribute_price->fields['attributes_price_factor'], $attribute_price->fields['attributes_price_factor_offset']);

    can be found in classes/shopping_cart.php not as stated above
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

 

 

Similar Threads

  1. Group Pricing Percentage Discount TROUBLE!
    By rubbermike in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 22 Jan 2010, 02:50 AM
  2. Percentage in attributes
    By Bartinigrafix in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 17 Feb 2009, 11:07 PM
  3. Percentage increase on attribute pricing
    By monmouthtaxis in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 20 Jun 2008, 11:42 AM
  4. Percentage pricing by attribute
    By Ryk in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 28 Dec 2006, 12:29 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR