Skip to content

Follow Up: Missing attributes in Article #17

@wolfomat

Description

@wolfomat

Hi Nicho,

somehow i can't use/debug your implementation locally.

however, the attributes now appear, but won't be transfered to cardmarket.
I think in StockService :: addArticles the XML Request needs to be altered.
I am not sure if there's a condition required, like if("pokemon".equals(a.getGame()) or something like that and then adding to the request:

temp.append("<isReverseHolo>").append(a.isReverseHolo()).append("</isReverseHolo>"); temp.append("<isFirstEd>").append(a.isFirstEd()).append("</isFirstEd>");

I am testing this now, and give you feedback

someting like:
StockService:addArticles(...):

....

		for(Article a : list)
		{
			temp.append("<article>");
				temp.append("<idProduct>").append(a.getIdProduct()).append("</idProduct>");
				temp.append("<count>").append(a.getCount()).append("</count>");
				if(a.getLanguage()!=null)
					temp.append("<idLanguage>").append(a.getLanguage().getIdLanguage()).append("</idLanguage>");
				
				if(a.getComments()!=null)
					temp.append("<comments>").append(a.getComments()).append("</comments>");
				
				temp.append("<price>").append(a.getPrice()).append("</price>");
				temp.append("<condition>").append(a.getCondition()).append("</condition>");
				temp.append("<isFoil>").append(a.isFoil()).append("</isFoil>");
				temp.append("<isSigned>").append(a.isSigned()).append("</isSigned>");
				temp.append("<isPlayset>").append(a.isPlayset()).append("</isPlayset>");
			if(a.getProduct() != null && a.getProduct().getIdGame() == 6) {
					temp.append("<isReverseHolo>").append(a.isReverseHolo()).append("</isReverseHolo>");
					temp.append("<isFirstEd>").append(a.isFirstEd()).append("</isFirstEd>");
				}
}
			temp.append("</article>");

		}	


would be a fix, i guess (it won't run with a locally build mkm-api, i don't know why)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions