Jump to content

burt

Team
  • Content count

    15,969
  • Joined

  • Last visited

  • Days Won

    687

Everything posted by burt

  1. burt

    PHP Coding

    No apology needed, I am sorry if I came across the wrong way, I have a habit of being "short on words" aka "blunt". In my first post in this thread, I showed a couple more options instead of using "if else". One of them is the ternary which is a shorthand system of "if / else". So. echo (this == that) ? 'this equals that' : 'this is different than that'; is EXACTLY the same effect as if (this == that) { echo 'this equals that'; } else { echo 'this is different than that'; } Do you see now? With the latest code you posted, that won't really work, but you did not give enough detail beforehand for anyone to know exactly what you were/are trying to achieve. It looks like you don't want to show prices based on SHOW_PRICES being 0 or not 0. What is SHOW_ACCOUNT for?
  2. burt

    PHP Coding

    So this code did not work for you?
  3. burt

    PHP Coding

    I posted the code you needed, then you said "I some times wonder why I request help in forums, as most of the time its like trying to get blood out of a stone". Gee, thanks a lot. Well, I posted the corrected code. READ it, then go to www.w3schools.com if you do not understand it. I'm out.
  4. burt

    PHP Coding

    "I just want to know if what I am trying to do can be done in this example." You did not even read my reply then. I'll stop helping you now, sorry I wasted my time ;)
  5. burt

    PHP Coding

    $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />'; $data .= (SHOW_ACCOUNT > 0) ? '' : $whats_new_price; $data .= ' </div>' . '</div>'; Please visit www.w3schools.com and find the PHP tutorial - this is basic knowledge which you need to read up on as it will help you in the future. In Roberts example; <div id="some_id"> <?php if ( $something == $something_else ): ?> <div>$something is equal to $something_else</div> <?php elseif ( $something != $something_else ): ?> <div>$something is NOT equal to $something_else</div> <?php endif; ?> </div> I believe it is easier to read as so; <div id="some_id"> <div> <?php echo ($this == $that) ? 'this is equal to that' : 'this is different to that'; ?> </div> </div> Rob and I will agree to disagree :D
  6. burt

    PHP Coding

    echo (DO_SOMETHING > 0) ? '' : OUTPUT_SOMETHING; OR if (DO_SOMETHING > 0) { echo ''; } else { echo OUTPUT_SOMETHING; } OR if (DO_SOMETHING <= 0) echo OUTPUT_SOMETHING; I would use the first one. You need to make sure that "DO_SOMETHING" is comparable against the number zero. You need to make sure that "OUTPUT_SOMETHING" is something that can be output.
  7. burt

    Module request - Buyer back-end

    There's two of you that need it. Why not bang your heads together, find more people who want the same, all chip in a few dollars and get it coded up. Easy!
  8. burt

    Module request - Buyer back-end

    If you cannot code this yourself, then you need to find a developer who will code it for you. Or you might wait years for someone who can code to realise they need it for themself, and even then you have to hope that they would make it into an add-on. So, if you have the cash, get it developed, make it into an add-on and sit back and bask in the glory of lots of shop-owners using your codebase, and sending you thank you messages every day :thumbsup:
  9. burt

    960gs

    Precisely what George said, nothing more to add other than to say that I have no clue what official osc documentation will arrive for templating. I wrote a couple of UNofficial ebooks about templating already and cannot see myself writing one about 960/osc.
  10. burt

    960gs

    I firmly believe that any `designer` who uses 960 is doing so because he or she does not understand how not to use it. Something like that anyway ;)
  11. burt

    960gs

    Sammy - strip 960 out completely and instead be unshackled to do as you want for yourself and your client.
  12. burt

    Products Monitor

    2.x version. http://addons.oscommerce.com/info/7539
  13. burt

    Products Monitor

    Nice mod. I might port this to 2.x series.
  14. burt

    new order in database

    checkout_process.php
  15. burt

    Contributing to core code

    Fork it on github. Work on your own fork. Any good changes can easily be picked up by HPDL.
  16. Hi Alan I am successfully using the Github version (without the css changes) with no problem. Is it possible that you have introduced an error somewhere? Or is it possible that you have neglected to completely update your code to that in the Githb?
  17. Yes, this is possible but is not straightforward. You need to; 1. (obviously) set up the colour options 2. link an image to each of those options 3. make a smaller image for each of those options and link those to show the larger version 4. use javascript to swap out the large image based on the colour selected 5. use more javascript to change the selected option based on which image is presently "live"
  18. burt

    Free Shipping to certain areas

    You will need to create (or have created for you) a shipping module which; 1. the store owner can insert prices for postcodes 2. the shipping module then picks up the postcode and charges the correct amount (free or otherwise) It is possible that this already exists as a contribution, you can try a search for it.
  19. burt

    New search architecture

    Always happy to help test something interesting.
  20. burt

    Converting V2.2 add-ons to V3

    Well, it's not hard to convert from 2.2 to 3, however it is not for anyone who is not completely at ease with oscommerce.
  21. burt

    Template install

    Ask the template provider!
  22. You also need to make the template admin file... admin/includes/templates/
  23. burt

    Purchase Without Account

    Peter, I agree with everything you have to say. PWA has never been a solid addition to any site in my opinion - it's better to strip out some of the checkout and only "hide" other bits. Remember that a buyer doesn't need to create an account, he does need to give contact details and payment info though - and if an account is created from that, then it's all good.
  24. burt

    Contrib admin in next osC

    You own osCommerce as much as the next person, so if you want this to be a reality, you should go ahead and code it up. Or get someone to code it for you. There are at least 2 donation modules that I am aware of.
  25. burt

    Fix Design Details

    I believe you have to install no contributions to create space in an infobox. Just use CSS. What are you trying to achieve exactly? That said, I agree with you and hope the code in v3 is more semantically correct.
×