Jump to content

svagner

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Activity
    Freelancer

svagner's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Clayton, well, I'm trying to compile my own module from scratch, I haven't found any suitable module or template to start with. I'm not a beginner (even though PrestaShop novice) but I'm learning on the fly. My 'module' is yet far away from being ready, it has too many limits. Currently I'm stuck with all the javascript and object model and controllers and I'm not sure if I'm on the correct track. OK, anyway, once I learn something new, I'll try to drop a message here. SV.
  2. Hi, I'm developing a tiny module to get live stock levels from an external source. Currently I have 2 manufacturers, which have their stock levels available on their websites (xml and csv formats), they are updating the levels every ~10 minutes. My module is hooked to 'hookextraRight'. The module takes the $product->supplier_reference, gets the stock level and displays a small info block just below the 'buy_block' form. My module so far works ok. Now I'm lost with the new manufacturer, who has products with combinations (different colors). Once the product with combinations is displayed, the stock level for the 'default' combination is parsed and displayed. When selecting a different combination (different color) I have no idea how to call my hookExtraRight function again to get the stock level for the selectedCombination['reference'] updated. Can I somehow use the hook's code from the javascript (product.js) ? Well, probably not... Or should I use 2 functions to get stock levels (leave php on hookExtraRight and add javascript+jQuery version for combinations) ? Or should I leave completely the 'module + hook' idea and override the whole class and/or controller ? I would appreciate any idea or help. Thanks. (PrestaShop 1.4.8.2)
×
×
  • Create New...