Hikashop Acymailing plugin doesn't work correct

  • Posts: 101
  • Thank you received: 9
10 years 8 months ago #146197

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : x.x.x
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,

as I noticed today, the characteristics doesn't work correctly. In the list, only the main product is displayed and can be choosen. The Price of that product is 0 because the different prices are in the charasteristics of the product. The list only displays the ID of the characteristic but no title or description. If I choose a characteristic, in the preview only the price is diplayed...far away from the product. As it is, it's useless because all products in my clients shop are with characteristics. The main products doesn't have a price.

I have a screenshot to show you the problem.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 101
  • Thank you received: 9
10 years 8 months ago #146362

I'm a paying customer, could you say something about this problem, please?

Please Log in or Create an account to join the conversation.

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
10 years 8 months ago #146390

Hi,

Please understand that we can't answer to all messages in the minutes/hour.

Please provide your HikaShop version number and your Acymailing version number.
If we want to understand your environment, reproduce your problem and see what can be the source of it, the best is to have such information to be sure that we are looking in the right place.

Thanks for your understanding.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 101
  • Thank you received: 9
10 years 8 months ago #146427

It was almost 24 hours between my first and my last post. That's not every minute/hour.

Anyway, I'm using the latest versions that are: Hikashop 2.3.0 and Acymailing 4.6.0. And if you want to direct me to Acymailing, I wrote the exact copy of my first post at first in their forum. They say it's your plugin and you are responsible for the correct handling.

Please Log in or Create an account to join the conversation.

  • Posts: 82683
  • Thank you received: 13338
  • MODERATOR
10 years 7 months ago #146488

Hi,

This is actually the normal function of the AcyMailing intregration plugin. It only loads the data of the product/variant selected and not the dynamically generated data like we do on the product page/listing/checkout.
You would have the possibility to either enter the price you want to see there in the main product or either the image/description in each variant.

To add that dynamic capability, you can try to add the code:

if($product->product_type=='variant'){
			$db->setQuery('SELECT * FROM '.hikashop_table('variant').' AS a LEFT JOIN '.hikashop_table('characteristic') .' AS b ON a.variant_characteristic_id=b.characteristic_id WHERE a.variant_product_id='.(int)$tag->id.' ORDER BY a.ordering');
			$product->characteristics = $db->loadObjectList();
			$productClass = hikashop_get('class.product');
			$query = 'SELECT b.*,a.* FROM '.acymailing_table('hikashop_product',false).' as a LEFT JOIN '.acymailing_table('hikashop_file',false).' as b ON a.product_id=b.file_ref_id AND file_type=\'product\' WHERE a.product_id = '.(int)$product->product_parent_id.' ORDER BY b.file_ordering ASC, b.file_id ASC LIMIT 1';
			$db->setQuery($query);
			$parentProduct = $db->loadObject();
			$productClass->checkVariant($product,$parentProduct);
		}
after the code:
if(empty($product)){
			$app = JFactory::getApplication();
			if($app->isAdmin()){
				$app->enqueueMessage('The product "'.$tag->id.'" could not be loaded','notice');
			}
			return '';
		}
in the file plugins/acymailing/hikashop/hikashop.php that way, if you select a variant, it should get the data from the main product.

Please Log in or Create an account to join the conversation.

  • Posts: 101
  • Thank you received: 9
10 years 7 months ago #146652

Hi nicolas,

this only works partly as I'd like to have it. Now it displays correctly the title, the characteristics name and the characteristics price as title in the ready newsletter but without the picture and the description (of the main product).

In our case, we don't have a special title and desciption for the variants. They only differ in price depending on the package/weights of the main product.

So the taglist displays empty fields for title and description so that you just can guess which variant you are clicking at the moment. So we need a 3rd or maybe a 4th field to diferentiate. The price for differentiation is the most important and maybe the weight or package variant as a 4th field in taglist. And if the variants don'T have an own title and desciption it should take it from the main product.

Please Log in or Create an account to join the conversation.

  • Posts: 82683
  • Thank you received: 13338
  • MODERATOR
10 years 7 months ago #146693

Hi,

The description is taken from the main product with the code I gave you. If that's not the case, it would mean that the variant has a description of its own (maybe just a HTML tag with no text in it (some HTML editors add that).

For the image, change the line:
$checkfields = array('product_name','product_description','prices','images','discount','product_url','product_weight','product_weight_unit','product_keywords','product_meta_description','product_dimension_unit','product_width','product_length','product_height','files','product_contact','product_max_per_order','product_min_per_order','product_sale_start','product_sale_end','product_manufacturer_id','file_path','file_name','file_description');

to:
$checkfields = array('product_name','product_description','prices','images','discount','product_url','product_weight','product_weight_unit','product_keywords','product_meta_description','product_dimension_unit','product_width','product_length','product_height','files','product_contact','product_max_per_order','product_min_per_order','product_sale_start','product_sale_end','product_manufacturer_id');

in the file administrator/components/com_hikashop/classes/product.php and that should help.

Please Log in or Create an account to join the conversation.

  • Posts: 101
  • Thank you received: 9
10 years 7 months ago #146802

That doesn't help.

Maybe you also misunderstood me.

Again from the beginning. As you can see in the screenshot from the backend, there is a table with 3 columns (title, description and ID).
On main products these fields are filled and you can choose the appropriate product and it displays correct with picture in the newsletter.

On Variants, as you can see, these fields are empty...beside the ID. How can I differentiate which variant I should choose? You can't expect the users to remember all product ID's. So there must be more columns to differentiate. For example the price and the variant title

I'd like to have for variants that the table looks like: title (grabbed from the main product), the variant title, description (if empty on variants, grab it from the main product, price, ID. And the picture from the main variant too...if the picture for the variant is empty.

This way it is usable for clients. As it is now, it's almost useless.

At the frontend it should look: title, variant title, price (line feed) picture (left) - description (right).

Please Log in or Create an account to join the conversation.

  • Posts: 82683
  • Thank you received: 13338
  • MODERATOR
10 years 7 months ago #147197

Well the listing is displaying the name of the variants, if you don't enter any name in the variants, it's normal that the name column is empty.
Now I understand that in your case, it's not practical. However, adding such "grabbing" feature to the listing is a lot more involved than just getting it for one product. Actually, we never do it on listings in HikaShop because it would kill the page is you had too many products/variants in your database. So I don't have an easy copy/paste modification I can give you for that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum