• Content count

  • Joined

  • Last visited

Community Reputation

7 Neutral
  1. I am trying my hand at a wee plug-in. I have been tracking actual shipping costs in my 4.3.4 site and I want the same capability in 6.1. I have a report that lists shipping variances (the difference between shipping charged and shipping paid) so I can confirm that the shipping algorithms are tracking reality. I also export some CSV files that create the credit card purchases and payments in the accounting system that pay for over-the-counter shipping charges. Saves quite a bit of accounting time. Rather than dump myself into the vat of boiling oil that is un-upgradable software (again), I have decided to do it as a plug-in. Build some character, learn new tricks, that kind of thing. I did the obvious thing which is to pay a pound for that splendid worked example, Semper Fi's ever faithful product dimensions mod. I have created (in the COBOL sense of cloned and changed) a new plug-in. The admin page is up, and it looks fine in its limited way. However I noticed that although my plug-in is listed in the Settings - Languages - EN_UK drop-down list, there are no texts listed, whereas they exist for the Product Dimensions plug-in. My texts are definitely used by my page - I can change them in the XML file and the changes appear on the page after a refresh. What is required to register the texts with the language maintenance tool? Thanks for your help, Russ
  2. Steps to define a new hook

    I am developing a sequential order number solution and it seems like the right thing to do to create it as a plug-in so it can be shared if it gets off the ground. i have requested a hook at the appropriate place throug github, but until that materialises (probably the wrong word for software) I would like to add a custom hook so I can enjoy the whole developer experience. Is it enough to copy a nearby hook,then paste it with an adjusted name into the appropriate place? Is there any other declaration required on the provider side? I have read that the hooks.xml file is an info-only document, so I believe I don’t have to update that for a personal hook. Gotta say the whole hook/plug-in/snippet caper is a work of inspired genius, probably just one rung below the recent synchronised Falcon 9 Heavy booster landings. Full accolades to the perpetrators. I plan to use it for all my mods. Russ
  3. Oh, and bad me... Thank you, Whiskered One. You are like a geeky god to all of us.
  4. That did it. Now the mystery bar is gone. The enhancement added it. Will troubleshoot and contact the enhancement provider.
  5. Aha! The dreaded rogue <div>. I have just realised that my attempt to reinstate the original content.catalog.php has failed. I can see it is correct in terminal, and have cleared the caches and restarted apache, but still, it is using hte updated version. So therefore I clearly have not done one of these things at all... Stand down while I sort this out.
  6. Process for requesting a new code hook

    Thank you. I suspected as such, but I did not want to break protocol by doing the wrong thing. In the meantime I will proceed as above and back-port it if and when an official implementation is created. Thank you for your advice. So where are you? Probably not far from where I am, I suspect. Or you don't sleep...
  7. My existing store uses sequential order numbers. The coding for this is relatively trivial. I would like a code hook added to the createOrderId method of order_class. How does one go about requesting such things? I am thinking of something along these lines: -----------------------------------------8<----------------------------------------- public function createOrderId($return = false, $set_basket = true) { // Self-explainitory really... $this->_order_id = ""; <!-- Call hook here --> if ($this->_order_id == "") $this->_order_id = date('ymd-His-').rand(1000, 9999); if ($set_basket) { $this->_basket['cart_order_id'] = $this->_order_id; /* fix for admin generated orders */ if (method_exists($GLOBALS['cart'], 'save')) { $GLOBALS['cart']->save(); } } return ($return) ? $this->_order_id : true; } -----------------------------------------8<----------------------------------------- And while we are in there, we can fix the spelling of "explanatory". Kill two birds with one check-in...
  8. Apologies - this is the first time I attempted an attachment. How about this smaller one? The villains are outlined in red. I should point out that this is 6.1.13. And now I think about it, there is an extension in this area. I set content.category.php back to the original - same result.
  9. Under each product in a category list in the Foundation Skin, there is a grey bar. Does this have a function (as in under certain circumstances, stuff appears in it) or is it a decorative element?
  10. I reported a minor issue to a plug-in developer via a message. He would like to see a picture of the problem. There is a button below the message edit box that entices the author to "insert other media". However, "Upload" is not an option. Unlike the fora, there is no "Drag files here to attach, or choose files" option. How does one attach a new attachment to a message? ---- Breaking wind news --- Naturally, having posted the above (after half an hour of [fm]ucking about ) I immediately found a work-around. Open a posting to a forum. Drag or choose a file. It appears under "Your attachments" in the list of user-related stuff in the drop-down beside your username. Discard the posting to the forum. It has already done its job without being saved. In the message, choose "Insert other media - Insert existing attachment". But adding the "Drag files or choose" capability to the message editor would save a lot of hacking about.
  11. Plug-ins solutions for templates?

    Not that - the other thing. How do we kick of an initiative (he said, avoiding the word "project") to get a suite of template plug-ins defined?
  12. Plug-ins solutions for templates?

    Well you may grin, you whiskered exploiter of the wretched and downtrodden... I am about to put in a lot of time to commit to the platform. All of us need a growing user base that sustains the core open source development and feeds the ravenous hordelet of plug-in artisans and support suppliers such as your beardy, mysterious and contemplative self. To achieve this, we need a platform that has a reputation for ease of maintenance and a rich catalog of reasonably price options. We need both of these. Otherwise Shopify starts to look like the least-risk proposition. So, having agreed that it is a good thing, how do we make it happen?
  13. Plug-ins solutions for templates?

    Seems to me that for ongoing ease of maintenance, a formal solution for template enhancement is required. Since template developers are able to use any tools they like, it is may not be feasible to develop a universal solution. Guiding template developers by establishing template plug-ins as a desirable best practice for template designs, with a catalog of agreed appropriate hook points, seems to me to be an appropriate design goal for the future. Otherwise, the template developers are producing a static component that will pretty definitely be hacked by the store owners, resulting in a maintenance headache whenever a template update is released. Hooks are great, but without corresponding exits in the templates, the job seems to be only half done. Is this something that would be useful, or am I blowin' smoke?
  14. Plug-ins solutions for templates?

    I am thinking about the case where I want to add some functionality to the PHP application (at a hook) that adds fields to a page. The benefit of the PHP hook is that I can extend the business logic without having to reapply my changes when there is an update. A similar feature in the templates would allow template updates with similar benefits. Or are templates never updated?
  15. I am coming up to speed on the runtime solution for CC.6. I have read the “literature” for developers regarding extensions and plug-ins, installed the example and visitor stats demos and it all makes sense. Snippets are nice. But... (you were waiting for that...) is there a solution for templates that mirrors the hooks for PHP? Is manual intervention the only solution? Thanks, as always, for your help. Russ