Access a variable declared in a phtml from another phtml in Magento2

posted in: Design, HTML, PHP, Programming, XML 0

Having two blocks in the catalog_product_view.xml file like this: To access a variable declared in the first block from the second block, you can set the variable with register from the first phtml, then you get the value in the … Read More

How to export an ASP Associative Array to XML

“Asp Associative Array Class” provides a method to easly export all items to a well formatted XML string. For example, You can create a new *.ASP file : [sourcecode language=”vb”] <!–#include file="AssociativeArrayClass.asp" –> <% Dim Person, God Set Person = … Read More

How to populate an ASP Associative Array with records from MySQL / Access database Table

In this example, You can learn how to populate an ASP Associative Array with the records of a database table (MS Access or MySQL); then, how to programmatically manage well structured data without any extra SQL. Before to start: For … Read More

How to use Associative Arrays in ASP

First of all, You need to download the “Asp Associative Array class” then include the file “AssociativeArrayClass.asp” in your asp page. Right now, You can start declaring associative arrays in ASP with the following syntax: [sourcecode language=”vb”] Dim Person Set … Read More

VBScript Class to create easly Associative Arrays in ASP like in PHP

I’ve posted a project at Source Forge with an ASP/VBScript class to create easly associative arrays like in PHP; visit http://sourceforge.net/projects/asp-assoc-array/ It is possible also load in an associative-array the data coming from MySQL or MS Access databases, then You … Read More

PHP Date or Datetime to MySQL Datetime and viceversa

Two useful PHP functions to convert normal date/datetime (“25.12.2010 12:10:00” or “25.12.2010”) to MySQL datetime (like “2010-12-25 12:10:00” or “2010-12-25 00:00:00″); You can get back a date/datetime from MySQL datetime too: [sourcecode language=”php”] function datetime2mysqldatetime($datetime){ // ‘25.12.2010 12:10:00’ -> ‘2010-12-25 … Read More

How to remove accent marks and german umlauts from URLs and Strings in .NET

I wrote two functions in .NET to remove easly any accent and umlaut marks from a string and to get the equivalent non-accented string, this is very useful to normalize URLs; for example, with the StripAccentMarks() method, from “àbcdèéfghìlmnòpqrstùvzäöüÄÖÜ” u’ll … Read More

Multilingual applications with VB.NET

posted in: C#, Programming, VB.Net 2

In this simple tutorial you’ll learn how to manage different languages for a vb.NET application and the simplest way to access programmatically to the string values in the resource compiled files (*.resx) created by Visual Studio; Adding resource files: First … Read More

Updated version of CryptographyHelper class for .NET Framework 4

posted in: C#, Cryptography, Programming, VB.Net 1

This updated version of mine “CryptographyHelper” wrapper/helper class supports .NET Framework 4 . With this vb.net class you can easly encrypt/decrypt strings using a robust symmetric Rijndael algorithm or you can get also MD5 or SHA1, SHA256 hash codes of … Read More

1 2