magento 1.9 – How can I display a dropdown customer attribute on the customer registration form?

I still can not figure out how to show the dropdown on the customer registration form below app / design / frontend / base / default / template / persistent / customer / form / register.phtml

Any ideas like?

Setup file:

    startSetup ();


$ installer-> addAttribute ("customer", "customer_group"), array (
"type" => "int",
"backend" => "",
"label" => "customer group",
"input" => "select",
"source" => "customerattribute / eav_entity_attribute_source_customeroptions15505846310",
"visible" => true,
"required" => wrong,
"default" => "Business",
"Frontend" => "",
"unique" => false,
"note" => ""

));

$ attribute = Mage :: getSingleton ("eav / config") -> getAttribute ("customer", "customer_group");


$ used_in_forms = array ();

$ used_in_forms[]= "adminhtml_customer";
$ used_in_forms[]= "checkout_register";
$ used_in_forms[]= "customer_account_create";
$ used_in_forms[]= "customer_account_edit";
$ used_in_forms[]= "adminhtml_checkout";
$ attribute-> setData ("used_in_forms", $ used_in_forms)
-> setData ("is_used_for_customer_segment", true)
-> setData ("is_system", 0)
-> setData ("is_user_defined", 1)
-> setData ("is_visible", 1)
-> setData ("sort_order", 100)
;
$ attribute-> save ();



$ installer-> endSetup ();

Source File:

_Options)) {
$ this -> _ options = array (

Array (
"label" => Mage :: Helper ("eav") -> __ ("Business"),
"Value" => 1
)

Array (
"label" => Mage :: helper ("eav") -> __ ("Personal"),
"Value" => 2
)

Array (
"label" => Mage :: helper ("eav") -> __ ("Institution"),
"Value" => 3
)

);
}
return $ this -> _ options;
}

/ **
* Get radio button
*
* @return array
* /
public function getOptionArray ()
{
$ _options = array ();
foreach ($ this-> getAllOptions () as option $) {
$ _options[$option["value"]]= Option $["label"];
}
Return $ _options;
}

/ **
Get a text for the option value
*
* @param string | Integer $ value
* @return string
* /
public function getOptionText ($ value)
{
$ options = $ this-> getAllOptions ();
foreach ($ options as $ option) {
if (option $)["value"] == $ value) {
$ Return option["label"];
}
}
return it incorrectly;
}

/ **
* Retrieve column (s) for flat
*
* @return array
* /
public function getFlatColums ()
{
$ Columns = Array ();
$ Columns[$this->getAttribute()->getAttributeCode()] = Array (
"type" => "tinyint (1)",
"unsigned" => false,
"is_null" => true,
"default" => zero,
"extra" => zero
);

return $ columns;
}

/ **
* Get indexes for Flat
*
* @return array
* /
public function getFlatIndexes ()
{
$ indexes = array ();

$ index = "IDX_". strtoupper ($ this-> getAttribute () -> getAttributeCode ());
$ indexes[$index] = Array (
"type" => "index",
"fields" => array ($ this-> getAttribute () -> getAttributeCode ())
);

return $ indexes;
}

/ **
* Get the selection for updating the flat attribute
*
* @param int $ store
* @return Varien_Db_Select | zero
* /
public function getFlatUpdateSelect ($ store)
{
return Mage :: getResourceModel ("eav / entity_attribute")
-> getFlatUpdateSelect ($ this-> getAttribute (), $ store);
}
}

[WTS] Get Adult Virtual Hosting Provider! Exmasters.com

This is a discussion about Get Adult Virtual Hosting Provider! Exmasters.com – 100% customer satisfaction! within the Webmaster Marketplace Forums, part of the business category; Exmasters is a world leader in adult web hosting and offers a new concept …

,

[WTS] KVChosting.net quality SSD VPS offers high availability and low prices

This is a discussion about KVChosting.net quality SSD VPS offers high availability and low prices within the Webmaster Marketplace Forums, part of the business category; KVC Hosting was founded in 2010 with the sole purpose of creating a host company that is affordable to all. …

,

Crazy fast VPS server | SSD drives with RAID-10 | 24/7 customer service! | Proxies-free

CanSpace solutions is Canada's leading provider of hosting services. Our VPS plans are 100% Canadian, and fully managed solutions – We take over the administration of your server, so that you can concentrate on your business. CanSpace solutions is a CIRA certified Provider – annually by the Government of Canadaand we have been in the hosting business for a while now ten years, Our headquarters are located here in Canada. Our data centers and all our servers are is located in Canada, All of our employees are here in Canada and we only charge Canadian dollars. We are the leading Canadian .ca domain registrar, The largest companies and organizations in Canada trust us. If you have not guessed, CanSpace is a very proud Canadian company – just like your own.

VPS functions:

  • Full root access – you can customize your hosting server to your liking
  • Always up to date – our Canadian technicians ensure that your VPS server software is updated at night
  • cPanel and WHM included. The industry-leading hosting control panel is included for free ($ 22 / month).
  • All servers in Canada are on Canadian IP addresses

VPS solutions from CanSpace are fully managed – Let us do the technical hosting work as you build your business. We take care of all aspects of VPS hosting server administration, including backups, server security, updates, and general maintenance. Server administration is a full-time job and requires staff around the clock – leave it to us as you focus on your website!
check-Out Canspace.ca Fully managed Canadian VPS hosting Packages:

VPS hosting plan 25
25 GB SSD hard disk space
Unlimited bandwidth
1 vCore
6 GB RAM
Fully managed
Price – $ 89.99 / month [ORDER NOW]

VPS hosting plan 50
50 GB SSD hard disk space
Unlimited bandwidth
2 vCore
12 GB RAM
Fully managed
Price – $ 139.99 / month [ORDER NOW]

VPS-100 hosting plan
100 GB SSD hard disk space
Unlimited bandwidth
4 vCore
24 GB RAM
Fully managed
Price – $ 179.99 / month [ORDER NOW]

Additional upgrades!
Available during the ordering process. Dedicated IP addresses can be added at any time.
Additional 50 GB hard disk space $ 19.99 / month
Additional storage space of 100 GB $ 34.99 / month
Additional 200 GB hard disk space $ 54.99 / month
Additional 500 GB hard disk space $ 99.99 / month
Additional dedicated IP $ 3.00 / month

Additional functions:

  • Secured at night. Our VPS hosting management team takes care of your VPS host backups and can restore server accounts at any time
  • Free Migration Services – We can migrate your existing cPanel accounts for free
  • Restart access so you can remotely restart your hosting server when needed
  • Clean IP Addresses – Your VPS hosting server is provisioned for Canadian IP addresses that are not blacklisted

Performance and safety features:

  • VPS server with CSF and LFD firewalls and Web application firewall at a high level.
  • Your server is monitored 24/7 by our Canadian security team for hacking.
  • DDoS-free data center. Unlike other VPS hosting providers, we protect you against DDoS attacks and never disable a VPS hosting server due to a DDoS attack.
  • RAID-10 SSD drives for redundancy, reliability, and lightning-fast performance

Why choose Canspace service?
1) Powered by green energy – All CanSpace servers are fully powered by 100% Canadian green energy, The energy comes directly from Beauharnois hydroelectric power plant in Quebec.
2) High-speed network – We have over 7.5 Tbps network capacity available in our data center to support our customers. We have several backbone bandwidth carriers and redundant storage. Our entire infrastructure is completely redundant at several levels.
3) Infrastructure with high availability – All CanSpace hosting services provide protection against all types of DDoS attacks. ON 160 Gbps anti-DDoS infrastructure was set up in our data center up to 480 Gbps traffic, 24/7,
4) data security – All data with CanSpace are always stored in Canadian bordersand is subject only to Canadian law. We do not store data in the US or elsewhere. Your data will not be subject to foreign court orders or DMCA deletion requests, and no foreign legal entity will ever be able to access your data. This is a requirement for many of our Canadian government customers and we serve all our customers with the same benefits.

OUR GUARANTEES:
1) High VPS performance – VPS hosting solutions are faster than shared hosting plans and have dedicated resources available only to your server.
2) Fully managed – Focus on building your website and let us do the technical hosting. CanSpace handles all server management, including backups, security, maintenance, and updates.
3) Dynamic VPS resources – VPS hosting plans are flexible and can be expanded as needed. As your site grows, you can also use the resources for your VPS hosting.
4) WHM & cPanel – Full root access to your hosting server as well as access to WHM and cPanel ($ 22 / month value), With root access, you can customize your VPS hosting server as needed.
5) High availability – All VPS servers are hosted on our server DDoS-free data center, Unlike other hosting providers, we protect your servers from DDoS attacks rather than simply disconnecting them.
6) SSD drives – Your VPS servers will do this Use RAID 10 SSD storage Deliver the fastest, most reliable hosting storage solution, lightning fast speed, and full redundancy.

We know that hosting is about delivering superior service, support and reliability – and that you want to offer the same to your customers. We treat all our customers with the same level of service and professionalism – whether small startups or large companies. We are always happy to hear from you! At the CanSpace We are proud of our superior customer service. We try to answer all inquiries within half an hour, though most will be answered in less than 10 minutes.

Existing customers can get one Unterstüzungsticket about our customer area. Our support technicians are available 24 hours a day, 7 days a week, Existing customers are urged to use our ticket system so we can properly track your issue.

TEL: 1-888-99-DOT-CA
E-mail: [email protected]
Like us on Facebook

[WTS] Pure SSD RDP server | Instant Setup | New Windows Server 2019


RDP VPS Sale @ Veeble Hosting –
Flat 25% discount
————————————————– ————————————————– ———————————-


Windows SSD RDP VPS

From $ 11.25 per month
Unmeasured 100/1000 Mbps bandwidth
FREE Basic Management on all plans
Windows Server 2003, 2008 R2, 2012 R2, 2016, 2019 available
No additional costs for the operating system
administrator access
Dedicated resources
Intelligent system control with shutdown, boot, reboot, reinstall, and console access.
Instant Setup
UK / US Server isolated
RAID 10 protected solid state drives

Use the promo code DEAL2018M take advantage of the discounted rates at the cash desk.

Order these plans here http://www.veeble.org/vps/windows

————————————————– ————————————————– ————————————————– ————————————————– —————-

We accept the following payment methods

PayPal
Skrill
All major international credit cards
Perfect money
payee
Advanced Cash
Bitcoin, Ethereum, Litecoin, Ripple
All Indian credit / debit cards and netbanking
Internet money
paysafecard
Alipay
Unionpay
Tenpay
Qiwi
Local bank transfer in the US, UK and Germany
Wire / Swift Transfer

Learn more about the payment methods here – https://www.veeble.org/how-to-pay

————————————————– ————————————————– ————————————————– ————————————————– —————-

Our support

We work tirelessly around the clock for world-class support and a wonderful customer experience.
You can contact us via

E-Mail / Tickets (24×7)
Live Chat (24×7)

————————————————– ————————————————– ————————————————– ————————————————– —————-

Connect with us through social networks

Google+: https://plus.google.com/+VeebleOrg
Twitter: www.twitter.com/veeble
Facebook: www.facebook.com/veeble
LinkedIn: www.linkedin.com/company/veeble

If you have questions, sign up at http://veeble.org/support

,

magento2 – Magento 2: Get the customer postal code from the checkout shipping step

I have a custom module with an API. The postal code of the customer is the parameter for the postal code. How can I get the customer's postcode from both the customer and logout in my custom block? I have used the following code

if ($ this-> customerSession-> isLoggedIn ()) {
if ($ customer) {
$ billingAddress = $ customer-> getDefaultBillingAddress ();
if ($ billingAddress) {
return $ billingAddress-> getPostcode ();
}
}
} else {
$ postCode = $ this-> checkoutsession-> getQuote () -> getShippingAddress () -> getPostcode ();
return $ postCode;
}

In a deregistered case, however, the postal code is only loaded after the first loading. I would like to receive the postal code of the customer from the checkout "Checkout".

Please help

magento 1.9 – Get all information related to a customer

I wanted to retrieve all the information about a particular customer (giving the account number).

I mean, I would like name, surname, e-mail, billing / delivery addresses (including the ORIG_SYSTEM_REFERENCE for each) city, region, country and so on.

I tried different queries, but nobody really helped me.

CHOOSE
E-mail,
a.entity_id AS addressId,
IF (def_billing_address.value = a.entity_id, 1,0) AS isDefaultBillingAddress,
IF (def_shipping_address.value = a.entity_id, 1,0) AS isDefaultSippingAddress,
addr_firstname.value AS first name,
addr_lastname.value AS Last Name,
addr_street.value AS street,
addr_city.value AS city,
addr_region_code.code AS stateCode,
addr_region.value AS state,
addr_zipcode.value AS postalCode,
addr_country.value AS countryCode,
addr_telephone.value AS phone
FROM mg_customer_entity AS c
INNER JOIN mg_customer_address_entity AS ON ON.parent_id = c.entity_id

LEFT JOIN mg_customer_entity_int AS def_billing_address ON
(def_billing_address.entity_id = c.entity_id) AND
(def_billing_address.attribute_id = (SELECT attribut_ID FROM mg_eav_attribute AS as WHow eav.attribute_code = # default_billing # and eav.entity_type_id = 1))
LEFT JOIN mg_customer_entity_int AS def_shipping_address ON
(def_shipping_address.entity_id = c.entity_id) AND
(def_shipping_address.attribute_id = (SELECT attribut_ID FROM mg_eav_attribute AS as WHv eav.attribute_code = # default_shipping # and eav.entity_type_id = 1))
LEFT JOIN mg_customer_address_entity_varchar AS addr_zipcode ON
a.entity_id = addr_zipcode.entity_id AND
addr_zipcode.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = & # 39; postcode & # 39; and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_city ON
a.entity_id = addr_city.entity_id AND
addr_city.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = & # 39; city & # 39 ;, and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_country ON
a.entity_id = addr_country.entity_id AND
addr_country.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = & # 39; country_id & # 39; and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_firstname ON
a.entity_id = addr_firstname.entity_id AND
addr_firstname.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = # firstname # and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_lastname ON
a.entity_id = addr_lastname.entity_id AND
addr_lastname.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = & # 39; lastname & ea; and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_text AS addr_street ON
a.entity_id = addr_street.entity_id AND
addr_street.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = & # 39; street & ea; and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_telephone ON
a.entity_id = addr_telephone.entity_id AND
addr_telephone.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = # telephone and # eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_region ON
a.entity_id = addr_region.entity_id AND
addr_region.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = # region and # eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_int AS addr_region_id ON
a.entity_id = addr_region_id.entity_id AND
addr_region_id.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS as WHow eav.attribute_code = # region_id # and eav.entity_type_id = 2)
LEFT JOIN mg_directory_country_region AS addr_region_code ON
addr_region_id.value = addr_region_code.region_id

This is the MAGENTO database diagram:

Can help me with this?

image

Design – The most efficient way to get a clear customer base

I'm working on a system that stores customer purchase details for multiple stores. For example, you want to know how many unique customers they had in a given day range for a particular store or for all stores.

One way to do this is to store data in a relational database (SQL) as follows:

CREATE TABLE TransactionCustomers
(
ShopId int,
TransactionDay datetime2,
CustomerId int
)

And then query how many customers are between appointments:

SELECT COUNT (DISTINCT (CustomerId))
FROM TransactionCustomers
WO TransactionDay BETWEEN & # 39; 2019-02-01 & # 39; AND & # 39; 2019-02-14 & # 39;
AND ShopId = 3

I'm wondering if anyone can imagine a way to do that, shifting the processing load to the application that writes the transactions – essentially pre-computing the individual customer count? Or is there any technology other than a relational database that is better suited for this calculation?

[WTS] Trusted SSD VPS offerings from kvchosting.net at affordable prices.

This is a discussion about Trusted SSD VPS offerings from kvchosting.net at affordable prices. within the Webmaster Marketplace Forums, part of the business category; KVC Hosting was founded in 2010 with the sole purpose of creating a host company that is affordable to all. …

,

[WTS] Pure SSD RDP server | Instant Setup | New Windows Server 2019


RDP VPS Sale @ Veeble Hosting –
Flat 25% discount
————————————————– ————————————————– ———————————-


Windows SSD RDP VPS

From $ 11.25 per month
Unmeasured 100/1000 Mbps bandwidth
FREE Basic Management on all plans
Windows Server 2003, 2008 R2, 2012 R2, 2016, 2019 available
No additional costs for the operating system
administrator access
Dedicated resources
Intelligent system control with shutdown, boot, reboot, reinstall, and console access.
Instant Setup
UK / US Server isolated
RAID 10 protected solid state drives

Use the promo code DEAL2018M take advantage of the discounted rates at the cash desk.

Order these plans here http://www.veeble.org/vps/windows

————————————————– ————————————————– ————————————————– ————————————————– —————-

We accept the following payment methods

PayPal
Skrill
All major international credit cards
Perfect money
payee
Advanced Cash
Bitcoin, Ethereum, Litecoin, Ripple
All Indian credit / debit cards and netbanking
Internet money
paysafecard
Alipay
Unionpay
Tenpay
Qiwi
Local bank transfer in the US, UK and Germany
Wire / Swift Transfer

Learn more about the payment methods here – https://www.veeble.org/how-to-pay

————————————————– ————————————————– ————————————————– ————————————————– —————-

Our support

We work tirelessly around the clock for world-class support and a wonderful customer experience.
You can contact us via

E-Mail / Tickets (24×7)
Live Chat (24×7)

————————————————– ————————————————– ————————————————– ————————————————– —————-

Connect with us through social networks

Google+: https://plus.google.com/+VeebleOrg
Twitter: www.twitter.com/veeble
Facebook: www.facebook.com/veeble
LinkedIn: www.linkedin.com/company/veeble

If you have questions, sign up at http://veeble.org/support

,