Magento 1.7 product re-import issue - magento-1.7

I am trying to re-import a simple product file in magento 1.7 after deleting these products. File is successfully importing but products are not visible in manage products page even after re-indexing

If import is succesful and your products are showing in the database but not in the backend, make sure that all required attributes are set.
After the import you can do the following:
Go to catalog -> manage products. Your current url will look like:
[yoursite.com]/index.php/admin/catalog_product/index/key/[your_key]/
Change this url to [yoursite.com]/index.php/admin/catalog_product/edit/id/[product_id]/key/[your_key]/
You can find the product ids in the database. When you enter this url, you can edit the product and check/edit product attributes, like tax class, status, etc and make sure alle required attributes are set.

Related

Custom POST/PUT route/endpoint based on meta value

I'm currently making a store which is receiving it's data from external sources. Being new to the world of editing/creating REST API, I've come across a problem. The problem is that the external source have no idea what ID the product gets in woocommerce so update/delete products is not possible with the current endpoints/routes. However, the external source does have it's own ID on it's product and I've stored this in a custom meta field in woo and I can see it and update it through api on Postman.
How can i create a new endpoint/route that uses the custom meta field called externalProductId and use this to update the product instead of the woocommerce ID?
What you can do, which I particularly did in my case ... Create a field id_product_woo in your external bank, the time you create the product in Woocommerce, it returns a JSON with the information of the product created, including the ID inside Woocommerce... When you create or update a product in Woocommerce, you then pass the id stored in the id_product_woo field of your external bank.
Apparently, this for me, worked perfectly.

how can i upload course and user with its id on moodle

I want to upload course using upload courses menu.
and i want to import the id with the other fields.
I tried "id","shortname","fullname","category" as a filed on the csv.But it uses incremented id instead.
Oh and i want the same thing for user too.
That cannot be done - all ids in Moodle are automatically generated, in order to make sure they always uniquely identify the item (course, user, etc).
Instead of trying to identify the course by id, you should look at identifying it by shortname or idnumber.

Sitecore - WFFM : Link contact facet with user profile field

I'm working on a Sitecore 8 Update 2 site.
I'm also using the web forms for marketers.
I've set up a login and register form using WFFM. I was able to link fields on the form with the fields of the user profile ( the one used in User Management )
However when i want to make a "Update Contact Details" i can't link the fields on the form with the profile fields as before. Now i have to select a "contact facet". I added one of these and WFFM picked up on this, so now i can link the field on the form with a facet.
The last link i'm missing is linking this facet ( stored in Analytics - MongoDB ) to the profile field.
Does anyone know how to achieve this ?
Bonus: This started off as a slighty different question, you can read more about this issue here:
How to update sitecore user with webforms for marketers ( Update Contact Details )
First you need to add the Create User Save Action and setup the email address as the username.
Then you need to add the User login Save Action straight after that. This is because the Update Contact Details Save action only applies to logged in users.
Then you can use the Update Contact Details Save Action. This action will create data in MongoDB under the logged in user name - so if you go to the Identifiers collection MongoDB a new entry will be created (See screen shot below).
So in short the aspnet_membership data and the MongoDB data is linked via the username in WFFM. In aspnet_users - UserName and in MongoDB by way of an identifier. You can't mix the MongoDB and aspnet_profile data they belong in two separate places.
So once you have created this user in WFFM you could call up their details using the analytics API using the identifier:
Tracker.Current.Session.Identify(username);
var personalInfo = Tracker.Current.Contact.GetFacet<IContactPersonalInfo>("Personal");
Hope that makes sense :)

Empty product list for guest requests

I am trying to read Magento product list via REST API using guest account. My Magento instance responds to GET /api/rest/products/1 as expected, with:
<?xml version="1.0"?>
<magento_api>
<entity_id>1</entity_id>
<type_id>simple</type_id>
<sku>simple_sku</sku>
<name>simple</name>
<meta_title/>
<meta_description/>
<description>description</description>
<short_description>short description</short_description>
<meta_keyword/>
<tier_price/>
<is_in_stock>0</is_in_stock>
<regular_price_with_tax>100</regular_price_with_tax>
<regular_price_without_tax>100</regular_price_without_tax>
<final_price_with_tax>100</final_price_with_tax>
<final_price_without_tax>100</final_price_without_tax>
<is_saleable>0</is_saleable>
<image_url>http://localhost/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/image.jpg</image_url>
<url>http://localhost/index.php/catalog/product/view/id/1/s/simple/</url>
<buy_now_url>http://localhost/index.php/checkout/cart/add/uenc/aHR0cDovL2xvY2FsaG9zdC9hcGkvcmVzdC9wcm9kdWN0cy8x/product/1/form_key/6DQ0mBsIua4HpuGN/</buy_now_url>
<total_reviews_count>0</total_reviews_count>
<has_custom_options/>
</magento_api>
However, asking the same Magento instance for a list of products using GET /api/rest/products returns empty result, when I would expect a list containing that product:
<?xml version="1.0"?>
<magento_api/>
The result is populated correctly when calling as oauth authenticated user, but I need it working for guest account.
Guest REST role has been configured to get "All" resource access and "All" attributes. I have this behaviour for Magento versions 1.9.0.1 and 1.9.1.0, for both formats: xml and json, (json returning []). Also changing "All" guest settings to manually selected checkboxes didn't solve this issue.
Thanks to this blog post, I found out that Magento doesn't show out of stock products for guest role in REST API. To change this behaviour, edit setting System > Configuration > Catalog > Inventory > Stock options > Display out of stock products
Reason for that behaviour could be, that guests shouldn't see unavailable products because they cannot order or do anything with them. At the same time admin can see them, because they are potentially edible for him (if admin role has been granted that permission).

SUGARCRM plugin - webservice client with setup

I have a task to develop plugin for SugarCRM. Plugin should be "hooked" to contacts, leads and/or targets.
After I add contact to SugarCRM plugin should send data (with some fileds) to specific webservice (method to insert new person into DB).
I did create logical hook to contacts and before save I send data to webservice.
My biggest problem are fields. SugarCRM admin should be able to make setup for plugin like this
Plugin gets list of fields from webservice
Admin maps fields from "SugarCRM contacts" to "webservice persons" fields
for example
SugarCRM contact | webservice person
"first_name" => "firstname"
"last_name" => "familyname"
"gender" => "mf"
....
So when contact is added to SugarCRM, plugin should be able to read this setup and match every field before sending to webservice.
Can someone give me tips how to start with this, is there something similar online?
Thanks
You could create a dropdown menu where the left value is the SugarCRM Field name and the right value is the Webservice field name. Then direct users/system administrator to modify this dropdown in the Dropdown Editor, which has a nice and easy interface.
The plugin can then access this menu as a key => value array with $GLOBALS['app_list_strings']['my_list_name']
Alternatively, you can create your own configuration page if you want to develop a custom interface for this. A starting point for that might be this article, although it was written with SugarCRM 6 in mind: http://www.profilingsolutions.com/archive/quick-configuration-pages/
The configuration page would write to the Configurator (stored in config_override.php), as Antonio Musarra pointed out.
Either way, a caveat you'll encounter is that users will mistype field names. You'll need some sort of validation in your webservice call to ensure that all fields actually exist within the web server and within SugarCRM.