I'm doing some automation for an CRE/oscommerce site (supplier's inventory to client's store inventory) and I'm running into:

A database table products_options_values which I've just discovered has two fields together as key, and no auto_increment field, which means I'll have to figure out the next value for products_options_values_id before I can do an insert. If anyone has any insight, I'm all ears. I'm lazy and don't like to have to hunt for the next insert id, not to mention it seems like a bad idea. Maybe I missed the bigger picture? 😕

<warning>This deteriorates into a rant from here on</warning>

I find the forums at oscommerce not very useful. To be honest I gave up over there after reading several posts there. Whats up w/ cramming people's respones into scrolling panes on forums? :mad: A little scrolling window is a lame UI, esp since the browser content can extend down the page indefinitely. (I've seen this on this site too, makes me worry)

Thankfully I don't have to do any moding of OSC pages themselves. I like to see a little more use of layers in the design of software than I'm seening in OSC. :queasy:

    OK I just fell out of my chair laughing....what do you expect to find in content/templates/products_info.tpl.php?

    Why, database queries of course!!!

     $product_info_query = tep_db_query("select p.products_id,...
    //rest omitted for your sanity
    

      You could always recommend switching to zencart (http://www.zencart.com) 🙂

      Otherwise I'd be tempted to just add the auto-increment in myself; that seems very odd that it wouldn't be in there.

        Zen Cart was orginally based on osCommerce code from June 2003 and has undergone rapid development since that time.

        You could always shoot yourself in the foot too but I wouldn't recommend that, the source code is just as nasty.

          I use osCommerce mainly because it comes with my host. Boy am I lazy. I think I might check out Zencart though. If it is based off of osCommerce then it might be easy to switch over.

            Jason Batten wrote:

            You could always shoot yourself in the foot too but I wouldn't recommend that, the source code is just as nasty.

            Here is where I'd disagree, even though I'm sure osc has upgrdaded their code since I used them. ZenCart has been completely rewritten basically, although the original code did come from OSC. The core group of developers is tight and very cohesive, which makes development much cleaner and versions released much more rapidly. ZenCart has been using a templating system since I started using them in 2003; at the time OSC was not nearly as clean and easy to upgrade and had no system in place. I believe OSC has since switched to a templating system, but as far as I know, Zencart still crushes them with code and ease of upgrading.

              You could always shoot yourself in the foot too but I wouldn't recommend that, the source code is just as nasty.

              "Let him who is without ever writing nasty code cast the first stone"

                pohopo wrote:

                "Let him who is without ever writing nasty code cast the first stone"

                :quiet:

                  5 days later
                  jazz_snob wrote:

                  OK I just fell out of my chair laughing....what do you expect to find in content/templates/products_info.tpl.php?

                  Why, database queries of course!!!

                   $product_info_query = tep_db_query("select p.products_id,...
                  //rest omitted for your sanity
                  

                  OK first off what kind of idiot quotes himself (raises hand) Guilty!

                  Anyway, here is the opposite extreme in templates, this is the whole thang;

                  <?=$content?>
                  

                  This is a an ecommerce check out page which is rather heavily formatted for printing in the logic portion, which isn't entirely bad but equally amusing as the OSC template I quoted above. BTW, xcart templates win award for most if/else conditionals in a template. I'm not sure why smarty templates are such a big deal anyway. To me its like they built this whole "engine" which is really just a mini version of PHP, coded in PHP. Maybe I'm missing something...

                  In case you're wondering, I got in trouble in school for talking to much...to MYSELF.

                    Write a Reply...