Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 39
  1. #11
    Join Date
    Apr 2008
    Posts
    21
    Plugin Contributions
    1

    red flag Re: Prices based on gold, which changes daily

    haha string were too easy, just cloned admin\includes\languages\english/product.php to admin\includes\languages\english/product_gold.php

    any other cloning you can think of?

    Also I just looked at the product GUI info collector and there's:
    Tax Class:
    Products Price (Net):
    Products Price (Gross):

    So normally you type into Gross, and it calculates Net using javascript and when you hit save it's doing what? grabbing the Net value and placing that in products_price?

  2. #12
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Prices based on gold, which changes daily

    Language files will do you wonders ...

    Look at the ones for product and the one for product_free_shipping product types ...

    There are constants built for these ...

    Also in the downloads are product types that are bigger, but give you an overall scope of how these compare ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #13
    Join Date
    Apr 2008
    Posts
    21
    Plugin Contributions
    1

    Idea or Suggestion Re: Prices based on gold, which changes daily

    WOW!!! I owe you thanks so much for helping me! It's turned out better than I expected!!

    Take a look:
    Name:  gold.jpg
Views: 315
Size:  8.9 KB

    ... and it really works!

    It does:
    1. go to admin > localization > currencies (where I have set up US$ and XAU which is the official gold index) and hit update. It goes to xe.com and gets today's gold rate!
    2. create new product, set type to "Product - Gold"
    3. it queries the currencies table and gets the value of XAU
    4. set up product, and then put price in either Net or Gross, the javascript allows Net and Gross to fight with each other and when they're done calculating they then mulitply the result by goldValue.
    5. the value of Net is put into a field called products_base_price
    6. the calculated $US price is put into a field called products_price.
    7. hit preview and it shows the $US price
    8. hit insert/update and it puts the base price into the db as products_base_price (which is ignored by other product types ) and the day's estimate $US price is put into the normal products_price field!
    The customer may now buy the item!
    Next step is to edit the code in admin > currencies > localization and put in an extra button called "Update prices of Gold products" which simply does a batch update of the entire products table, multiplying products_base_price by goldValue and putting the answer in each case into products_price

    Remaining questions, how do I clean up the product_types table? can I just delete the extra product types (Document - General, Product - Music, etc)? I should also then delete the actual products in the products table. What else? I don't want to delete the rubbish and end up breaking zen cart! But also I don't want my store manager to accidentally set a $3000 gold ring as a downloadable document!

    The other thing is, where will I begin to look for the code to edit to put an extra button into admin > localization > currencies? It will have a form post action I believe which when invoked will fire off my sql batch update statement.

    Thanks so much

  4. #14
    Join Date
    Apr 2008
    Posts
    21
    Plugin Contributions
    1

    Default Re: Prices based on gold, which changes daily

    Found where to edit, and it was really easy to do.

    admin/currencies.php
    and just created a new form action.

    My client's mind will be blown!

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Prices based on gold, which changes daily

    Sounds like you have done good ...

    Might consider contributing the new Product Type ... ain't that a tricky idea ...

    While you could delete product types, you never know when one might be handy for future use ...

    You might consider setting the Product type on the Category to exclude things you do not use, instead ...

    Edit the Category to see where you can set the allowed Product Types ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #16
    Join Date
    Jul 2008
    Location
    China
    Posts
    1
    Plugin Contributions
    0

    Default Re: Prices based on gold, which changes daily

    How profoundly you talked! Make me sense!!!
    keep us posted!!!

    ##############################___
    jewelry store

  7. #17
    Join Date
    Apr 2008
    Posts
    21
    Plugin Contributions
    1

    link problem Re: Prices based on gold, which changes daily

    You're quite right, I should just "turn off" product types for certain categories, that's a very nice solution.

    I would be more than happy to contribute my work if I knew how. The code is neat and works well and looks elegant on the screen. Two main worries are that I hard coded the text strings instead of using a language file (easy to fix) and I also hard coded the gold index (XAU) into my sql queries, eg. "select value, last_updated from currencies where code = 'XAU'" so that would need to be generalised to make it more useful. Also what if you have products that are based on gold and other products based on platinum?

    Anyway, I'm happy to share

  8. #18
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Prices based on gold, which changes daily

    That is something that makes taking what you have done and tossing it into a play site of a test v1.3.8 and then when you get bored you fix a bad thang like "I hard coded" here and did this there ... and kind of polish it a bit, if you can ...

    Or, put together what you have and any SQL to make this work, say ... this is where I got to and this is where it needs to be taken further ...

    Add-ons and contributions have to grow from something ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #19
    Join Date
    Apr 2008
    Posts
    21
    Plugin Contributions
    1

    Default Re: Prices based on gold, which changes daily

    Ok, I'll do that. I can neaten it up and then submit it. Where do I submit it to? I'm an opensource virgin

  10. #20
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Prices based on gold, which changes daily

    In the Downloads is a submit button for add-ons ... thanks!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Anything pull daily price changes / Drop Shipper?
    By LilleyPadGifts in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 26 Aug 2011, 09:44 PM
  2. Limiting which products are available based on Customer Login
    By cebronix in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 22 Jan 2009, 07:37 PM
  3. Setting Up Shipping Prices based on categories or Based on Table?
    By CoolCarPartsOnline in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 21 May 2008, 07:22 AM
  4. sales tax is based on which one?
    By lina0962 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 19 Jun 2006, 02:26 PM
  5. different prices based on quantity
    By liveaday in forum General Questions
    Replies: 4
    Last Post: 2 Jun 2006, 02:13 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