Jump to content

zipurman

Members
  • Content count

    97
  • Joined

  • Last visited

  • Days Won

    3

zipurman last won the day on September 30

zipurman had the most liked content!

4 Followers

Profile Information

  • Real Name
    Preston
  • Gender
    Male
  • Location
    Saskatchewan, Canada
  • Interests
    Coding, Scale Modeling, Guitar
  • Website

Recent Profile Visitors

1,120 profile views
  1. zipurman

    Product Counts

    This hook got absorbed into https://phoenixaddons.com/product/zipur-product-manager/
  2. Features: Password protect migration utility to avoid usage from third parties Link to OSCommerce MySQL Database Link to CE Phoenix MySQL Database Link to file structure for OSCommerce Export Link to file structure for CE Phoenix Import Test server to make sure PHP and MySQL are setup correctly Tests read/write/delete security Upgrade old OSCommerce Data Detects OSCommerce data version by the state of what upgrades are missing. Applies upgrades to the database to upgrade OSCommerce to 2.3.4 Choose what data to migrate Queries the OSCommerce tables and allows you to choose any tables you want to transfer, including custom tables that your mods have created Check targeted tables in CE Phoenix to make sure table is empty Will use the selected tables from the “Choose what data to migrate” and compare those against the target CE Phoenix tables and alert you to any required changes Transfer MySQL Data Now Will apply any required changes based on previous alerts in previous steps All targeted tables in CE Phoenix will be emptied before being populated. There are warnings beside tables in previous steps to avoid this on some tables like “configuration” table Any missing tables will be created to match the OSCommerce specs for that table Any missing columns will be added to tables prior to import to make sure any custom data is not lost All data from OSCommerce database will be migrated to CE Phoenix database Transfer Images Now All image files and folders will be migrated from OSCommerce to CE Phoenix English language file for all text (Language Switch functionality to come if enough interest) You can refer to phoenixaddons.com for more info. Find it here in Marketplace: https://apps.oscommerce.com/jZAuB&osc-to-cephoenix-migration-utility-0-1-6&c=other All feedback, problems, suggestions welcome. Zipur
  3. Thanks Fredi. A new site and a new version is coming soon. The tool does require PHP allow exec as well as remote fopen. I will be making all of my add-ons available without the use of the toolbox as it was more of a proof of concept.
  4. A good point that was brought up, was that the tool pulls code (at user request only) from a third party site. Here are some points to help with that concern: It would have been much easier for me to just provide each plugin with its own download link and have people drag/drop that to their catalog. I may do that yet, however I am using common functions to avoid code overlap etc. I am not sure how many users proof read their code they download (they should) to make sure it doesn't do anything that isn't advertised . It's really no different than what Wordpress does with plugins and themes. In Wordpress, the updates are automatically applied from each authors website. In the Zipur Toolbox, downloads have to be requested and then they go to the admin/updates folder and the user has to then click to update/install. You could review the code in the admin/updates folder prior to updating/installing if you'd like to review it for behaviors. You can review the code of the Zipur Toolbox to confirm that it doesn't install anything without being asked to by the user. All of the downloads come from zipur.ca but are never auto-applied 
  5. Zipur Toolbox offers the following features to CE Phoenix and OSCommerce: Modules Easy installer of packaged add-ons. These add-ons have to be created with the Package Creator or manually created to match the spec expected by zipur Toolbox. Once add-ons are installed using the tool, you can easily uninstall, reinstall, delete, update the add-ons with a click of a button. Online Library This Library will allow you to download any add-ons developed by Zipur with a click of a button. You will also be able to see what is installed and what updates are available. Package Creator This is the best part as a developer. It allows you to code in your IDE and when done, you can package the files you need as well as SQL adjustments for install/uninstall/upgrade as well as turning any mods on/off pre/post install. It will also allow you to change all file versions and header copyright blocks at the time of packaging. You can even download a zip file from the tool containing your new package. The package is then ready to distribute to people also using this tool and they can install with a click of a button. Version File Report This report downloads a matching version of the core of your install. It then compares against your installed version and shows you what files have been changed, added, removed. If you are using OSCommerce, you will have to manually download and place a copy of the core. Requires PHP 7.1 at minimum, but 7.3 recommended to avoid herdoc indent errors You can also refer to zipur.ca for more info. Find it here: https://apps.oscommerce.com/RdMqY&zipur-toolbox-0-2-0&c=other All feedback, problems, suggestions welcome. Zipur
  6. zipurman

    Product Counts

    This now has several new features, including toggle product layouts to list, 2, 4, 6 grids. http://zipur.ca/knowledgebase/phoenix-zipurinstock/ Zip
  7. zipurman

    Product Counts

    Have a look at this as I did code this to avoid changing any core files. http://zipur.ca/knowledgebase/phoenix-zipurinstock/
  8. zipurman

    Product Counts

    Thanks peterpil19 I have already joined the group and looking to get more involved.
  9. zipurman

    Product Counts

    Thanks raiwa, I was just looking at your KissIT Image Thumbnailer Pro project I'll review your comments and see what I can come up with. Just learning osCommerce and Phoenix. A week ago I hadnt even heard of either project I am working on this for a friend that had a 12 year old store running 2.2. I have since migrated all to Phoenix and its going good. As a result, I took interest in the osCommerce and Phoenix projects and have just been playing around. Thanks again for your time to point me in the right direction! Zip
  10. zipurman

    Product Counts

    Thanks raiwa, your comment lead me to a better way of doing it. Create a file /includes/hooks/shop/siteWide/zipurInStock.php <?php /* * zipurInStock - Version 0.1.1 - July 4, 2020 * Code provided by zipur of zipur.ca * Use as you like ;) */ class hook_shop_siteWide_zipurInStock { var $version = '0.1.1'; function listen_injectBodyEnd() { if ( $this->show_areas() == 1 || $this->show_areas() == 2 ) { ?> <script> $(function () { $(".btn-buy").each(function() { var qty = $( this ).attr( "data-in-stock" ); if (typeof qty === 'undefined') qty = 0; if (qty > 0){ var extraclass = ''; if (qty < 2){ extraclass = 'zipreallylowstock'; } else if (qty < 6){ extraclass = 'ziplowstock'; } $(this).after('<div class="zipinstock"><span class="zipqty ' + extraclass + '">' + qty + '</span> In Stock</div>'); } else { $(this).after('<div class="zipsoldout">SOLD OUT</div>'); $(this).remove(); } }); }); </script> <?php } } function show_areas() { global $PHP_SELF; if ( basename( $PHP_SELF ) == 'product_info.php' ) { return 1; } else if ( basename( $PHP_SELF ) == 'index.php' ) { return 2; } else { return 0; } } } I would use the boostrap css, but this gives more control as bootstrap has limited colors as far as I can see. This css can be added to user.css or stylesheet.css .zipsoldout { color: red; display: inline-block; padding: 5px; } .zipinstock{ padding: 10px; text-align: center; } .zipqty{ color: #4d763b; } .zipreallylowstock{ color: #bd4205; } .ziplowstock{ color: #f28b06; }
  11. zipurman

    Product Counts

    I wasnt able to find any docs on existing hooks that would allow me hook into the product_info and index pages as required. Would love to see an example or a link to an example of the right way to do that. The css is specific to the code. I realize I could leverage existing css classes, but this isnt a full and complete hook ... just a shared example of something I was playing with. A full hook that is published to the library should have much more work to it of course.
  12. zipurman

    Product Counts

    Okay, I created the following hook instead. Not sure if this will work in oscommerce as I only tested in Phoenix. Just thought I would share here in case it's helpful. create a file /includes/hooks/shop/zipurInStock/pi_hooks.php <?php /* * zipurInStock - Version 0.1.0 - July 4, 2020 * Code provided by zipur of zipur.ca * Use as you like ;) */ class hook_shop_zipurInStock_pi_hooks { function listen_showInStock() { if ( $this->show_areas() == 1 || $this->show_areas() == 2 ) { ?> <script> $(function () { $(".btn-buy").each(function() { var qty = $( this ).attr( "data-in-stock" ); if (typeof qty === 'undefined') qty = 0; if (qty > 0){ var extraclass = ''; if (qty < 2){ extraclass = 'zipreallylowstock'; } else if (qty < 6){ extraclass = 'ziplowstock'; } $(this).after('<div class="zipinstock"><span class="zipqty ' + extraclass + '">' + qty + '</span> In Stock</div>'); } else { $(this).after('<div class="zipsoldout">SOLD OUT</div>'); $(this).remove(); } }); }); </script> <?php } } function show_areas() { global $PHP_SELF; if ( basename( $PHP_SELF ) == 'product_info.php' ) { return 1; } else if ( basename( $PHP_SELF ) == 'index.php' ) { return 2; } else { return 0; } } } Then add the following 2 lines near the end of the file /templates/default/includes/components/template_bottom.php $OSCOM_Hooks->register( 'zipurInStock' ); $OSCOM_Hooks->call( 'zipurInStock', 'showInStock' ); Then you can style as needed in user.css or stylesheet.css .zipsoldout { color: red; display: inline-block; padding: 5px; } .zipinstock{ padding: 10px; text-align: center; } .zipqty{ color: #333; } .zipreallylowstock{ color: #bd4205; } .ziplowstock{ color: #f28b06; } Seems to work good so far
  13. zipurman

    Product Counts

    BTW, It would be an easy add to the core and I am sure most shop owners would appreciate the "OPTION" of showing this information.
  14. zipurman

    Product Counts

    I'll see what I can come up with for a plugin that doesnt touch core files
  15. zipurman

    Product Counts

    Sorry, here is a new version as some quantities are less than zero and this will catch them too. $checkparams = explode( ' ', $params['params'] ); $newparams = array(); foreach ( $checkparams as $item ) { $newtest = explode( '=', $item ); $newparams[] = $newtest; } $finalparams = array(); foreach ( $newparams as $item ) { $item[0] = str_replace( '"', '', $item[0] ); $item[1] = str_replace( '"', '', $item[1] ); $finalparams["{$item[0]}"] = $item[1]; } if ( isset( $finalparams['data-in-stock'] ) ) { if ( (int) $finalparams['data-in-stock'] <=0 ) { $button = '<div style="color: red; display: inline-block; padding: 5px;">SOLD OUT</div>'; } else { $button .= '<br/>' . $finalparams['data-in-stock'] . ' In Stock'; } }
×