Close

Profile: hristian.dimov

Avatar

User posts

Custom Rules
11 years ago

IvanSlater wrote:
Hi Hristian,

thanks a lot. Do you have a simple sample? I need to create another plugin, a "rule plugin", is it right?

EDIT:

I have created a new plugin with all my new rules. Now, can you say more about both interface methods:

- GetAllowedTokens
- GetCustomerReminderInfos

I guess they are called at each task call, am I right? The CustomerReminderInfo list returned are all items that will received the message?

And about the tokens, if I create a new one, where it have to be replaced? Or is not possible to have new ones?


Thanks!


Yes, you can done it with a plugin.

Example of The CustomerReminderInfos method:

public IList<CustomerReminderInfo> GetCustomerReminderInfos(TimeSpan conditionMetDataEarlierThan, TimeSpan conditionMetDateLaterThan, int storeId)
{  
  var customerReminderInfos = new List<CustomerReminderInfo>();

  //perform your logic for selecting the data that you need
  IList<global::Nop.Core.Domain.Customers.Customer> inactiveCustomers = GetInactiveCustomers(conditionMetDataEarlierThan, conditionMetDateLaterThan);

  foreach(var customer in inactiveCustomers)
  {
    var customerReminderInfo = new CustomerReminderInfo()
                     {
                       Customer = customer,
                       ReminderMessageId = customer.Id,
                       RuleConditionMetDate = customer.CreatedOnUtc,
                       Tokens = GetTokens(customer), // or you can leave it as "new List<Token>()"
                       StoreId = storeId
                     };

    customerReminderInfos.Add(customerReminderInfo);
  }

  return customerReminderInfos;
}

private IList<Token> GetTokens(Customer customer)
{
  var tokens = new List<Token>();

  tokens.Add(new Token("Customer.FullName", customer.GetFullName()));

  return tokens;
}


and yes, you can create new tokens, but you must evaluate them in the GetTokens method, just like the example above.

GetAllowedTokens method example:

public IList<string> GetAllowedTokens()
{
  var allowedTokens = new List<string>()
              {
                "%Customer.FullName%"
              };

  return allowedTokens;
}


Hope this helps!

Bugs
11 years ago

Meredith88 wrote:
Hi,

I have an issue when I have 2 or more different items in the cart.  When I try remove any of the products other than the top product nothing happens.  Any guidance on this issue would be much appreciated.

Edit: Forgot to mention this is in version 3.4

Thanks in advance,

James


Hi James,

can you reproduce this on our demo site http://themes.lighthouse.nop-templates.com/ ?

If not can you please update the theme to the latest version following this article: http://www.nop-templates.com/how-to-update-a-nopcommerce-theme

11 years ago

ron.richardson wrote:
I would like to see another option for COndition Type for Topics.  I'd like to put a widget zone on the generic topics view, but be able to show different content in that widget zone on each page.

For example, on topic page A, show one image in the widget zone, but on topic page B show a different image in the same widget zone.


Hi Ron,

thank you for your feedback !

Please suggest this idea to our uservoice portal and we might consider adding it in the future releases of the plugin.

11 years ago

C.A.LL wrote:
Hi,

I have installed the plugin parameters with google ecommerce me but does not reflect sales paid by PayPal or TPV-Sermepa in analytics. Do you know why this might happen? That's the theme or plugin settings.

Thanks


I'm not sure what could cause the problem, because we don't have the source code of the plugin and therefore we cannot advice you. You need to contact the plugin vendor for more information about it.

Custom Rules
11 years ago

IvanSlater wrote:
Hi there!

Is possible to create custom rules?

I want to schedule mails for some especifics situations based on procuts, shipments and others attributes.

Thanks!


Hi IvanSlater,

Yes, it is possible to create a custom reminder rules.

Basically, you just need to implement the IReminderRule inferface.

When you do this, your rule will appear in the reminder rule dropdown in the administration.

Hope this helps!

ehubcap wrote:
Hi support, I stumbled upon this error at my website http://ehubcap.net/ order detail page while I was running a dry test.
I got it also replicated at the demo page, see it here:
http://themes.traction.nop-templates.com/orderdetails/7.
Could you please tell me the fastest way to find the error and fix it?.
I spent some time chasing it around, but I realize that you guys will find in a snap, rather than me wasting time trying to filter it out.
Also there is a lot of logged errors 10000+ that are being generated due a missing reference like this one:
"(Resource string (sevenspikes.themes.nitro.common.itemboxcomparebutton) is not found Language ID = 1)"  I suppouse that it can be corrected by editing the string text to ==> Resource string (sevenspikes.themes.traction.common.itemboxcomparebutton) and the error will go away..... right?
please confirm
Thank you
Jose Plunkett
ehubcap


Hi Jose,

this has been already fixed. Please download the latest package of the theme and replace these files:

Themes/Traction/Views/Shared/_ProductBox.cshtml
Themes/Traction/Views/ReturnRequest/ReturnRequest.cshtml
Traction/Views/Customer/DownloadableProducts.cshtml
Themes/Traction/Views/Order/Details.cshtml

Plugins/SevenSpikes.Theme.Traction/Resources/Resources.en-us.xml

If you have done any modification to the files, you will need to merge them.

Hope this helps!

11 years ago

Lucrasoft wrote:
Is it possible to add functionality to search in product attribute combinations? Because we would like to search on the sku configured in the product attribute combinations.


Hi Lucrasoft,

Unfortunately this is not possible. The Instant search plugins uses SearchProducts method, which comes from NopCommerce and this method does not allow to search in product attribute combination.

11 years ago

deselt wrote:
1. it would be nice if it have option select only certain category in menu (not everyone want to filter all store)
2. be able hide category filter ( don't make sense show category selection if you have filter on category page)


Hi Deselt,

Thank you for the suggestions.

Please suggest them in our UserVoice portal and we might consider adding them in the future releases of the plugin.

11 years ago

ylechasseur wrote:
Hi Guys,

I have a small problem with the product insertion. I did an interface to manage the products imported. In this interface, I add product specification, product pictures, text.... When I am saving, the pictures is added, mapped to the product_picture mapping, move to the FTP site and so on. When I look at the product on the web site, it is there, but when I click on it.. nothing happen. When I use the Quick Look, then no problem but then from this window, if I click on Go to Product Description, again nothing happen. I realized that I had to update the URLRecord table with the required information, but then, If I do it manually to test, I have an Error. If I open the product from the admin console and save it, then I found the entree into the able URLRecord in double and often with the same information as I did prior. I probably missing an insert in an other table, but I didn't find where.

Any idea what I could missed ?

Also, the Motion theme is great and very easy to work with as is.. very happy with my purchase...as usual with you guys.

Have a nice day

Yves
www.liveforsailing.com


Hi Yves,

You are on the right tracks about this.

After you insert your product you need to mimic the behavior of inserting into the UrlRecord table. I would suggest you to see what the Create method of the ProductController ( admin controller ) do and try to do it with your script. Before inserting into the UrlRecord table there is a method that validates the SeName of the product (check ValidateSeName method).
This means for example, if the product name is "just a new product" the generated SeName should be "just-a-new-product" and this is the SeName you need to insert into the table as a slug.

Hope this helps!

11 years ago

mail2mhm wrote:
hello
Dear hristian.dimov
We have 2 languages for our website and also We have 3 name s for our products, first one is Standard, that can not be left blank, second name is English, and third name is Arabic.
So When we choose Arabic for our site, local name means Arabic, and when we choose English for our site, the local name means English....
So we want to have a result in nop.instant.search in Both Standard name and local name.
Regards


Hi mail2mhm,

Unfortunately this is not possible. These 3 names are depending on what language you are currently using. Example: if you choose English then the product will be with English name;if you choose Arabic -> it will be in Arabic. So when the product model is prepared it will take the name for the currently selected language ( this is the way nopCommerce works ).

Hope this helps !