Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    318
    Plugin Contributions
    0

    Idea or Suggestion Create a custom attribute - Price Translation

    I'd like to create a custom attribute based off the existing text attribute model.

    I want this new attribute to display a text box where I could input a price into the field.

    Then once it is added to cart it would set the item price to what was entered in the attribute field.

    I'm thinking ... duplicating the current text item attribute then modifying it so that action=add_product would identify the new attribute and set the price accordingly. Somewhat like how the price by words works.

    Hoping someone could point me in the right direction to accomplish this.

    Thanks in Advance

    ~D

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,633
    Plugin Contributions
    9

    Default Re: Create a custom attribute - Price Translation

    Can you give us a little more explanation of what the goal and the process consist of that differs from the standard "priced by attributes" method that's in place?

    https://docs.zen-cart.com/user/produ...es-with-prices

  3. #3
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    318
    Plugin Contributions
    0

    Default Re: Create a custom attribute - Price Translation

    The goal would be to submit an item to the shopping cart at any price on the fly from the front-end of the website. With the price by attributes method, I would need to create an option value for every price. For example $1 $2 $3 ..... $5000. This would work but would be a bit bloated for its intention. Now I could create an option name for 1000's, 100s, 10s, & 1s. But then that creates a mess on the shopping cart page.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,633
    Plugin Contributions
    9

    Default Re: Create a custom attribute - Price Translation

    Forgive my confusion but, if I get it correctly, how would you prevent anyone logged in from putting in any price they liked?

    I've seen products set up as unit price of .01 to allow bill paying (1995 being $19.95) and know Edit Orders can change prices in the back end but, changing from the front end......

  5. #5
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    318
    Plugin Contributions
    0

    Default Re: Create a custom attribute - Price Translation

    It would be IP controlled.

  6. #6
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,418
    Plugin Contributions
    16

    Default Re: Create a custom attribute - Price Translation

    I've done something similar in my POS plugin so I'll share the basic idea. However, it's up to you to adapt it to what you're after because I'm setting the custom price through a different method, not even close to what you're trying to do.
    I believe you could use extra_cart_actions to override the standard action=add_product when the custom attribute field is submitted. Then, you can set a price for that item based on your input field (store it to session), and then edit includes/classes/shopping_cart.php just before $productTotal += $products_price; to override any previously determined product price and set your own based on what you have stored in session earlier.
    Zen Cart Point of Sale? Sure: ZX POS - v2 released
    My site - Pro ZC Help | My portfolio | My plugins

 

 

Similar Threads

  1. v1.2.x Can I create custom client logins w/custom products?
    By gdiddy1 in forum General Questions
    Replies: 4
    Last Post: 2 Nov 2015, 06:56 PM
  2. Add base price to attribute price so that attribute shows total amount
    By dcitsolutions in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 18 Nov 2010, 08:56 AM
  3. Need attribute price to display total price not incremental price
    By Rickk123 in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 2 Sep 2010, 06:26 PM
  4. Product attribute radio button value translation issues
    By jarlee in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 20 Aug 2010, 01:08 PM
  5. How do I add an attribute that if optioned would create a 50% off the final price?
    By silentmove1 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Oct 2009, 09:33 AM

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