PDA

View Full Version : Anybody Using Toolkit CallURL?


got2be
09-03-06, 03:18 AM
Hi All,

I am trying to find a way to import the contents of a text file into my category pages using the CallURL function in the Toolkit v. 5 and I cannot get it to work.

I am trying:
<mvt:item name="toolkit" param="callurl|pricerange|http://www.website.com/l.settings:sub_category:code" />

The result is literally "http://www.website.com/l.settings:sub_category:code" - it is not substituting the code in. Has anyone used this module and done something similar? I am just looking for a way to dynamically pull in one value based on the category code.

Thanks.

wcw
09-03-06, 04:30 AM
Take a look at the example on the product page or in the module's admin screen. You are trying to mix a string and variable in the url piece of the command. You are also missing two parameters (POST/GET and the fields). The latter is easy to fix. But there is no feature to splice a string to a variable; that is not one of the included functions. The url needs to be a fixed url. Did you try just the variable portion of the url and put the file in the same directory as the module (5.00/modules/util/ )? It may or may not work.

wcw
09-03-06, 04:50 AM
The url needs to be fully qualified and a fixed value in the function. If you are adding the line to a specific category's header or footer, you should be able to supply the complete file url without using a variable. Each category header would have a call to their specific text file. I presume you are updating text files outside of merchant and this is to pull that data in.

wcw
09-03-06, 03:03 PM
Good news: I added another function to the tool kit to handle dynamic urls. Here is an example of its usage.


<mvt:item name="toolkit" param="sassign|fullurl|http://www.emporiumplus.com/public/%replace%" />
<mvt:item name="toolkit" param="vglosub|fullurl,%replace%,some_variable" />
<mvt:item name="toolkit" param="vcallurl|sample2|fullurl|POST|" />
&mvte:global:sample2;


In this example I save a url string with a token to a variable called fullurl with sassign. Then in the next step use the vglosub to replace the token with the value of the variable. Then in the next step use vcallurl to display the contents.

You'll need to get the latest version of the tool kit from the store you originally got it from. If emporium plus, I'll need your order number.

For those not using the tool kit, you might want to take a look at the dozens of available functions. For those using it, if there is a new function you need, let me know and I may add it. Yesterday I added a breadcrumb function for saving the category breadcrumbs to an array so you can use formatting that better suits your store in the foreach loop of categories. Today, I added the vcallurl to take care of got2be's scenario. My goal is to make the tool kit the best bang for the buck in Merchant 5 modules. It continues to replace other more expensive modules that only have one feature.

got2be
09-04-06, 06:17 PM
Works great! Thanks Will. Your module has got me out of a few jams and I am looking forward to what else gets added!