Jump to content
ruilong

Module Prisjakt

Recommended Posts

I got it all solved before I got any answers so I change this topic :)

Here is a module for "prisjakt.se" a price index service in sweden.

The module will create a simple "text file" that can be read by price index servers so that your products will get indexed.
should be easy enough to make alterations on this for support of xml files or similar.

just point the servers to www.yourdomain.com/prisjakt.php

Enjoy

Updated with new file to list ALL products.

prisjakt.php

Share this post


Link to post
Share on other sites

Thank you, but it should be mentioned that the following line should be changed if one wants more then 10 products in the file

$products = $productClass->getProducts($lang, 0, 10, 'name', 'ASC', false);
$products = $productClass->getProducts($lang, 0, 100000, 'name', 'ASC', false);

Also it mght be a good idea to change tab to pike (|) for easier use with other tools

Share this post


Link to post
Share on other sites

Or use NULL instead of a number and just get them all......

$products = $productClass->getProducts($lang, 0, NULL, ‘name’, ‘ASC’, false);



Paul

Share this post


Link to post
Share on other sites
Or use NULL instead of a number and just get them all......

$products = $productClass->getProducts($lang, 0, NULL, ‘name’, ‘ASC’, false);



Paul



thanks for the imput, I changed it to null instead.


JONAS: the use of tab instead of pike is because that is the standard for this service, but if it needs to be adapted to other services then that is not so hard to change :)

Share this post


Link to post
Share on other sites

Here are some minor changes (new lines, product numbers etc)

echo "SKU|Name|Price|Category|Product URL|Graphic URL|In stock\n";


echo ($product['reference'])."|".
                ($product['name'])."|".
                number_format(Tools::convertPrice($price, $currency), 2, '.', '')."|".
                $category->name[1]."|".
                curPageURL().'/product.php?id_product='.$product['id_product']."|". //PRINT PRODUCT DIRECT URl
                curPageURL()._THEME_PROD_DIR_.$product['id_product']."-".$imageUrl['id_image']."-large.jpg"."|". //PRINT IMAGE URL {$img_prod_dir}{
$cover.id_image}-large.jpg
                $product['quantity']."\n"; //IN STOCK STATUS



I tried to make the URL:S har the user friendly rewrites but failed on products that have or dont have a ean13 value. There must be an easier way then this to get the friendly url

curPageURL()."/".($product['id_product'])."-".($product['link_rewrite'])."-".($product['ean13']).".html"."|".



I have used pike with prisjakt in the past without any problems but its no big deal

Share this post


Link to post
Share on other sites

you need to add a check also if the shop is using the rewrite or not.
I used to standard url since that works in both modes.

Share this post


Link to post
Share on other sites

Hi,

nice export scriptl!

Can make this also as .txt or .cvs file stored on the server?

Share this post


Link to post
Share on other sites

Works great except for one thing, Prisjakt want's it to include the Manufacturers.
How do I do that? :-)

/Mats

Share this post


Link to post
Share on other sites

It works perfectly in 1.4.4 so probably in 1.4.3 too...

 

Hello AndersIvar,

I download this script but i have the first line "SKU..." and no lines.

Have you make changes in this script ?

Share this post


Link to post
Share on other sites

It works perfectly in 1.4.4 so probably in 1.4.3 too...

 

:-) you're right, it doesw work. I must have done something wrong the first time. Works perfectly.

Share this post


Link to post
Share on other sites

hello guys.

can some one help out a newbee here.

How do we install this module please

 

 

cheers

 

 

x-sat.no

Share this post


Link to post
Share on other sites

i have install this script guys, but i get only this line

SKU Name Price Category Product URL Graphic URL In stock

 

here is the link to the script

http://x-sat.no/prisjakt.php

 

any help how to make this work with PS 1.4.4.1 Please.

 

thanks for any help

x-sat.no

Share this post


Link to post
Share on other sites

I can't get this to work I get same as x-sat.no got, how did u solve it?

 

Please help thxs.

Share this post


Link to post
Share on other sites

Hello! I downloaded this .php-file and then uploaded it to my domain through FileZilla. When I go to the domain "www.example.com/prisjakt.php" (in my case - www.phoneaccessories.se/prisjakt.php) it only shows this:

"SKU Name Price Category Product URL Graphic URL In stock"

 

Is this right or what do I have to do to get this to work? Need help fast! :)

 

Can I export my price file? And if I can how do I do that?

 

Med vänlig hälsning, Robin Stattin.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More