Jump to content

ArtcoInc

Members
  • Content count

    1,838
  • Joined

  • Last visited

  • Days Won

    31

Reputation Activity

  1. Like
    ArtcoInc reacted to burt in Hooks, hacks, or JavaScript?   
    The answer is pretty simple;  you do whatever it takes to get it working as you want...
    hook ht module content module js / jquery hack code The less intrusive way...is...in my opinion...the better way.  
    For the buy buttons, the simplest way is a piece of .js as a Hook.  1 file, done - set and forget. 
    There is a hook bit that I posted just yesterday, scan back through my last few posts...
     
  2. Like
    ArtcoInc got a reaction from valquiria23 in Hooks, hacks, or JavaScript?   
    There are several things I like to conditionally hide ... for example, if an item is out of stock, I want to hide the 'Buy' button. If a customer puts an item in their shopping cart, and then increases the quantity to more than is available, I want to hide the 'Checkout' button.
    Historically, I just hacked the code (yes, I hack the core code <hanging head in shame>) with an IF statement. Is there a better way?
    I know that @burt has done something like this in one of his 28 days bundles, but he used JavaScript, and I know *nothing* about JavaScript.
    I also have no idea how hooks work ( @burt , any chance someone could write up a tutorial on how hooks work, and how to use them? Or, a link to a resource that explains them?). I'm just a 'copy and paste' kind of guy.
    TIA
    Malcolm
  3. Like
    ArtcoInc got a reaction from Smoky Barnable in USPS Rate V4, Intl Rate V2 (official support thread)   
    @Chadduck
    1) As you have identified, there is no shipping_usps.gif file in the add-on bundle. Fortunately, you already had one from a prior live store. For anyone else trying to get this to work with Phoenix, here's the file:

    2) In the stock installation of Phoenix, there is no /images/icons folder. With that, there is also no DIR_WS_ICONS definition in the configuration file(s). To correctly use the shipping_usps.gif file, you need to:
    a) Create a /images/icons folder
    b) Copy the shipping_usps.gif file into this folder
    c) In  includes/modules/shipping/usps.php , find
    $this->icon = DIR_WS_ICONS . 'shipping_usps.gif'; and change it to:
    $this->icon = 'images/icons/shipping_usps.gif'; Obviously, you could use any other folder you want to store the .gif file. Just update the path to point to the file's location.
     
    If you did not have a copy of the shipping_usps.gif file, you could try to use the font awesome icon. The link Zahid gave above is wrong. His is a link to the UPS icon, not the USPS icon. The correct link is:
    https://fontawesome.com/icons/usps?style=brands
    However, the USPS module stores everything in an array (including the location of the icon), and I could not just substitute the Font Awesome link for the location of the .gif file.
    HTH
    M
  4. Like
    ArtcoInc got a reaction from Smoky Barnable in USPS Rate V4, Intl Rate V2 (official support thread)   
    @Chadduck
    1) As you have identified, there is no shipping_usps.gif file in the add-on bundle. Fortunately, you already had one from a prior live store. For anyone else trying to get this to work with Phoenix, here's the file:

    2) In the stock installation of Phoenix, there is no /images/icons folder. With that, there is also no DIR_WS_ICONS definition in the configuration file(s). To correctly use the shipping_usps.gif file, you need to:
    a) Create a /images/icons folder
    b) Copy the shipping_usps.gif file into this folder
    c) In  includes/modules/shipping/usps.php , find
    $this->icon = DIR_WS_ICONS . 'shipping_usps.gif'; and change it to:
    $this->icon = 'images/icons/shipping_usps.gif'; Obviously, you could use any other folder you want to store the .gif file. Just update the path to point to the file's location.
     
    If you did not have a copy of the shipping_usps.gif file, you could try to use the font awesome icon. The link Zahid gave above is wrong. His is a link to the UPS icon, not the USPS icon. The correct link is:
    https://fontawesome.com/icons/usps?style=brands
    However, the USPS module stores everything in an array (including the location of the icon), and I could not just substitute the Font Awesome link for the location of the .gif file.
    HTH
    M
  5. Like
    ArtcoInc reacted to kymation in USPS Rate V4, Intl Rate V2 (official support thread)   
    The code in Phoenix has been updated, but the functionality is the same. The USPS module uses arrays to store the values you are having problems with. Stock osC does not handle arrays, so we need to make some changes to make that happen. The change to modules.php is a key part of that.
    In Phoenix, find this code:
    if (tep_not_null($action)) { switch ($action) { case 'save': foreach ($_POST['configuration'] as $key => $value) { and add this line immediately after that:
    if( is_array( $value ) ) $value = implode( ', ', $value ); That should fix the problems on the Admin side. You will need to uninstall and reinstall the module for this to work. I haven't tested this module with Phoenix, so there may be other changes needed.
    Regards
    Jim
  6. Like
    ArtcoInc reacted to burt in How to verify a Postal Code matches a State?   
    Assuming that ZIP code locations don't change much...and that new ones don't get added very often, you could set up a database table to allow you to insert zip codes into it.  Then you perform a quick and easy lookup at the appropriate time (create_account?  in admin after the order is placed?).
    That sounds like a lot of work, but I am sure you know that the first 3 numbers in the zip correspond to States.   EG:  900 to 961 are all CA, 100 to 149 are NY, similar for the rest of the States.. 
    A little bit of work on the part of the shopowner, but obviously then no ongoing cost.  
  7. Like
    ArtcoInc reacted to BrockleyJohn in Script syntax error   
    The problem here is the way that what I guess was a template file in a content module has been changed into inline code in an execute function in a header tags module.
    It's using a heredoc string definition (the bit with the <<<) but still has the previous html/javascript with <?php echo...;?> bits. To get these to work in this context you would have to set them up in variables up front and then substitute them in the string. If that's all a bit complicated then an alternative is the grunt work of changing the code to lots of bits of quoted (and appropriately escaped) bits of string and concatenating them.
    By far the easiest approach to a conversion like this without much programming is to keep a separate template file. Header tags modules don't usually have a template file but that doesn't mean you can't have one!
  8. Like
    ArtcoInc reacted to burt in Where to load jQuery   
    jQuery is a blocking script (means it blocks the rest of the page loading until it itself is fully loaded), hence it is better placed as late in the HTML as possible (in other words as close to the end of the body as possible).  
    Make the jQuery code of your menu a siteWide Hook and inject the Hook in `SiteEnd`.  See the (deprecated) filterList hook for an example.
     
  9. Like
    ArtcoInc reacted to BrockleyJohn in Where to load jQuery   
    ...and this hook comes before footer_scripts so you can safely put scripts in there that depend on jquery.
    Incidentally they won't need to be document ready scripts in that position as the main document html has already loaded. Just the inner code should work fine and each one will save a (tiny) bit of parsing and processing, ie
    $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { event.preventDefault(); event.stopPropagation(); $(this).parent().siblings().removeClass('open'); $(this).parent().toggleClass('open'); });  
  10. Like
    ArtcoInc got a reaction from Dan Cole in Where to load jQuery   
    Phoenix 1.0.1.x
    While trying to troubleshoot a problem, I noticed that several of my menu modules were throwing these errors:
    The code in question is the first line here:
    A quick Google search said that these scripts were trying to load before the jQuery library was loaded. I looked, and jQuery was being loaded at the end of the page. When I moved the call to load the jQuery library into the <head> area, these errors went away.
    So, my question is: Should loading the jQuery library be in the <head>, or at the end of the <body>?
    M
  11. Like
    ArtcoInc reacted to raiwa in Purchase without account for 2.3.4 and BS2334   
    Uploaded update for Phoenix:
    Purchase without account 4.0.0
    Changes Version. 4.0.0
    - Updated for Phoenix
    2 versions included:
    Phoenix 1.0.2.0 and lower: old review write page "reviews_write_pwa.php"
    Phoenix 1.0.2.1 and higher: new reviews module "ext/modules/content/reviews/write_pwa.php"
    Older CE BS versions please use PWA for BS 3.0.5
    Older 2.3.4.(1.) versions please use PWA for BS 2.5r2
  12. Like
    ArtcoInc reacted to raiwa in List of my Phoenix compatible Addons   
    Updated PWA
    Purchase without account 4.0.0
  13. Thanks
    ArtcoInc reacted to raiwa in List of my Phoenix compatible Addons   
    Phoenix ready Addons:
    The following free Addons are updated for Phoenix and available on the Marketplace:
    Spanish Language Pack:
    https://apps.oscommerce.com/f8hiQ&espanol-para-osc-ce
    https://github.com/raiwa/OSCOM-CE-Phoenix-Spanish-language-idioma-espanol
    Recently Viewed Products:
    https://apps.oscommerce.com/z7iA8&recently-viewed-products-ce
    Related Products:
    https://apps.oscommerce.com/y0rDZ&related-products-ce
    Featured Products:
    https://apps.oscommerce.com/TyAIr&amp;featured-products-bs&amp;p=2
    Holiday Message:
    https://apps.oscommerce.com/G3NiL&holiday-promotional-message-ce
    Shop by Price:
    https://apps.oscommerce.com/Lia0H&shop-by-price-ce
    Wholesale Lite
    https://apps.oscommerce.com/VWUpG&wholesale-sppc-lite
    Discount Codes
    https://apps.oscommerce.com/iIUE4&amp;discount-codes-bs
    Checked and compatible with Phoenix:
    Slim Checkout:
    https://apps.oscommerce.com/pgaC2&slim-checkout
    Modules Control:
    https://apps.oscommerce.com/FM65c&modules-control
    Coming soon:
    KissIt Image Thumbnailer
    only one small update needed see:
    https://forums.oscommerce.com/topic/388022-kissit-image-thumnailer/?do=findComment&comment=1790276
    PWA (Purchase without account – Guest Checkout)
    QTPro
    Reviews Navbar Header Module
    Store Hotline
    Store Mode
    Sloppy Words Cleaner
    I’ll keep this lists updated when I’ll have ready new modules for Phoenix
  14. Like
    ArtcoInc got a reaction from burt in Default to List mode   
    @burt
    Thank you! Turning off the Grid/List header tag forces it into Grid mode. I'm trying to get List mode.
    While I did look at the product_listing file, what I ended up doing was to edit the grid_list_view header tag (yes, a core file edit 🙄), and eliminate the grid option. Uninstall and reinstall, and now it's list view only.
    Again, thank you.
    M
  15. Like
    ArtcoInc reacted to burt in Upgrade Path TO Phoenix   
    At this moment, today...Phoenix is the only viable option for a shopowner who wants a php7 ready and responsive version of osCommerce.
    I work on Phoenix every day, pushing it forward as best I can and I have a good group of shopowners and developers backing me up and giving ideas and advice.  If I wanted to start up a shop or to update an older osC version, I would utilise Phoenix and become involved in where it goes next.
  16. Like
    ArtcoInc reacted to burt in Category Description - Phoenix   
    Assuming talking about this:

    HTML (any, there is no limit)...works well.  That display is:
    <p>Fruit contains <b>many</b> nutrients and vitamins essential to health.  Eating fruit is an essential part of a healthy balanced diet.</p> <dl class="row">   <dt class="col-sm-3">Description lists</dt>   <dd class="col-sm-9">A description list is perfect for defining terms.</dd>   <dt class="col-sm-3">Euismod</dt>   <dd class="col-sm-9">     <p>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</p>     <p>Donec id elit non mi porta gravida at eget metus.</p>   </dd> </dl> <div class="w-100"></div> <img src="images/store_logo.png" class="img-thumbnail" width="300"><br><br>  
  17. Like
    ArtcoInc got a reaction from stefan1959 in Shipping Quote in Cart 2.3.3.4 - Support Thread   
    @stefan1959
    I can confirm that Ship in Cart v5 (see link above) does indeed work with Phoenix.
    M
  18. Thanks
    ArtcoInc reacted to raiwa in [Contribution] Ship In Cart   
    Hello Malcolm @ArtcoInc,
    The usps shipping module is zip code based. Please activate the zip field in the ship in cart module and fill in a default zip, usually the store’s zip.
  19. Thanks
    ArtcoInc reacted to ruden in bugs in review intaface admin side   
    fix escape string
    https://github.com/gburton/CE-Phoenix/pull/777/commits/830a9e9e6525993fafa16ab83cacb6297ad751a1
  20. Thanks
    ArtcoInc reacted to raiwa in bugs in review intaface admin side   
    this solution should do it
  21. Like
    ArtcoInc reacted to kgtee in Shopping Cart - strange double lines - 1.0.0.3   
    One way to work around is to separate the update button to another column:

     
  22. Thanks
    ArtcoInc reacted to raiwa in Shopping Cart - strange double lines - 1.0.0.3   
    Has been fixed in 1.0.1.0, shopping cart modularization
  23. Like
    ArtcoInc reacted to raiwa in [Contribution] Featured Products for v2.3.x   
    Phoenix version uploaded:
    Featured Products CE v2.0.0
    Featured Products CE v2.0.0. for OSCOM CE Phoenix 1.0.1.x
    tested under PHP 7.3
    Changes version 2.0.0.:
    - Updated for OSCOM CE Phoenix
    - moved expire featured products function call from application_top.php into a sitewide hook.
    - moved all html output into template files
    no more core changes at all.
  24. Like
    ArtcoInc reacted to raiwa in Search by Price Infobox   
    Updated version for OSCOM CE Phoenix 1.0.1.x uploaded:
    Shop by Price CE v.5.0
    Changes in Shop By Price v5.0
    - updated for CE Phoenix 1.0.1.x
    - Updated template naming and auto inclusion in box module
    - Changed default price ranges to fit Phoenix demo products prices
  25. Like
    ArtcoInc reacted to raiwa in Modules Control   
    Module Control 1.2.0 tested with OSCOM CE Phoenix 1.0.1.1 under PHP 7.3 and works flawless.
×